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

Re: Reverse Engineering Perl Tool?

by quidity (Pilgrim)
on Dec 08, 2000 at 16:53 UTC ( #45730=note: print w/replies, xml ) Need Help??


in reply to Reverse Engineering Perl Tool?

You might want to use Deparse to show you the reduced syntax, this will produce slightly prettier output, which might help you a little.

# bad perl print $foo; s/dog/cat/gm; m%foo%; FOO: for ($foo) { /dog/ && do {last FOO}; /cat/ && do {$dog = 'rabbit' +};} exit(0) or die "wooot?";

When run through Deparse:

bash-2.03$ perl -MO=Deparse badperl.pl badperl.pl syntax OK print $foo; s/dog/cat/gm; /foo/; FOO: foreach $_ ($foo) { if (/dog/) { last FOO; } if (/cat/) { $dog = 'rabbit'; } } die 'wooot?' unless exit 0;

As you can see, some bits get clearer, while others get a little more murky, but it's a useful tool.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://45730]
help
Chatterbox?
[thezip]: G'day all. Apparently Strawberry Perl has issues with deploying Spreadsheet::XLSX for Perl 5.24.1. I need this module to maintain compatability with an existing script. I'm new to Strawberry -- is there a safe way to manually deploy this?
[MidLifeXis]: Where is it hanging up?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-03-23 17:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (290 votes). Check out past polls.