当前位置: 动力学知识库 > 问答 > 编程问答 >

Reading a perl data structure into ruby

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: