问题描述:

I have a file containing a few thousand lines of perl, defining some large and complex data structures.

For reasons I won't bore you with, I need to read and process this data in ruby.

Is there

  • a really easy way of reading this data directly into ruby? (hey, I can dream :-)
  • some ruby module that will help me?
  • a different strategy that I should use (exporting from perl in some format, and importing into ruby perhaps)?

I'm very familiar with perl but am a ruby novice.

网友答案:

I'd advise you to go for a representation that is common to both languages like JSON.

相关阅读:
Top