[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Perl code in RUBY

Proneta Ghosh

6/4/2006 4:27:00 PM

hi,

can any one tell me how any one can use perl code in ruby language.. or
is it possible??

well i m new in ruby.. and i hav aome code written in perl that i do
not want to change but i need to run all the stuff in ruby, but cant
find a way to do that....

well thanx in advance...

2 Answers

Robert Klemme

6/5/2006 12:23:00 PM

0

AD_guru <proneta@gmail.com> wrote:
> hi,
>
> can any one tell me how any one can use perl code in ruby language..
> or is it possible??

No other than invoking the perl interpreter as an external process. There
have been some attempts of automated conversion. I do not know the exact
status of them but I believe there is nothing production ready.

> well i m new in ruby.. and i hav aome code written in perl that i do
> not want to change but i need to run all the stuff in ruby, but cant
> find a way to do that....

If you have loads of code that you do not want to migrate or cannot migrate
then the best is to still keep doing things in Perl. After all, what's the
point in having Ruby if 90% of your code is Perl anyway? Then it's cleaner
and easier to write the remaining 10% in Perl, too.

If you can isolate some parts that can be rewritten in Ruby piece by piece
then the approach with the external perl interpreter may make sense but
it'll be clumsy - at least for the transition period.

Kind regards

robert

Proneta Ghosh

6/5/2006 1:05:00 PM

0

thanx a lot...

may be i will shift to perl or make external call.. any way thanx a
lot...


Robert Klemme wrote:

> AD_guru <proneta@gmail.com> wrote:
> > hi,
> >
> > can any one tell me how any one can use perl code in ruby language..
> > or is it possible??
>
> No other than invoking the perl interpreter as an external process. There
> have been some attempts of automated conversion. I do not know the exact
> status of them but I believe there is nothing production ready.
>
> > well i m new in ruby.. and i hav aome code written in perl that i do
> > not want to change but i need to run all the stuff in ruby, but cant
> > find a way to do that....
>
> If you have loads of code that you do not want to migrate or cannot migrate
> then the best is to still keep doing things in Perl. After all, what's the
> point in having Ruby if 90% of your code is Perl anyway? Then it's cleaner
> and easier to write the remaining 10% in Perl, too.
>
> If you can isolate some parts that can be rewritten in Ruby piece by piece
> then the approach with the external perl interpreter may make sense but
> it'll be clumsy - at least for the transition period.
>
> Kind regards
>
> robert