Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Has anyone attempted to create a PHP to Perl converter?

by boftx (Deacon)
on Nov 13, 2013 at 06:01 UTC ( [id://1062333]=note: print w/replies, xml ) Need Help??


in reply to Has anyone attempted to create a PHP to Perl converter?

HRRRRUMMMMPPHHHHH! And people thought my idea of a quest to back-port Moose to Perl 4 was masochistic. :)

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.
  • Comment on Re: Has anyone attempted to create a PHP to Perl converter?

Replies are listed 'Best First'.
Re^2: Has anyone attempted to create a PHP to Perl converter?
by taint (Chaplain) on Nov 13, 2013 at 07:05 UTC
    LOL

    I see it as sort of regex puzzle. I can almost complete it in my head with sed. But personal evaluation tells me my Perl RE's fall far short of the mark. I'll have to push it off for a day when my Perl RE's can match my current sed skills. But by then. Who knows? :)

    Thanks for taking the time to respond, and thanks for your honesty. :)

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;

      Don't use regexp's for the same reason that you shouldn't use them for parsing HTML.

      Parse::RecDescent would be a better tool, I think. You might be able to handle the basic syntax that way but what about folks using PDO? It looks superficially like DBI, but... So I doubt you can do that much other than handling very simple cases.

        Greetings, einhverfr.

        Really good points -- especially where PDO's concerned. I hadn't thought about that. :(
        But I'm not totally convinced, where HTML is concerned (yet) :)

        Thanks for the response, einhverfr..

        --Chris

        #!/usr/bin/perl -Tw
        use Perl::Always or die;
        my $perl_version = (5.12.5);
        print $perl_version;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1062333]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found