Perl One-liner de-compile?

2005-04-25 Thread Larsen, Errin M HMMA/IT
Hi everyone, Here is an example from the perlrun perldoc page: perl -ane 'print pop(@F), \n;' is equivalent to while() { @F = split(' '); print pop(@F), \n; } My question is, can I get Perl to evaluate a command line (like above) and print out the

Re: Perl One-liner de-compile?

2005-04-25 Thread Paul Johnson
On Mon, Apr 25, 2005 at 01:45:15PM -0500, Larsen, Errin M HMMA/IT wrote: Hi everyone, Here is an example from the perlrun perldoc page: perl -ane 'print pop(@F), \n;' is equivalent to while() { @F = split(' '); print pop(@F), \n; } My

RE: Perl One-liner de-compile?

2005-04-25 Thread Larsen, Errin M HMMA/IT
-Original Message- From: Paul Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 1:53 PM To: Larsen, Errin M HMMA/IT Cc: beginners@perl.org Subject: Re: Perl One-liner de-compile? On Mon, Apr 25, 2005 at 01:45:15PM -0500, Larsen, Errin M HMMA/IT wrote: Hi

RE: Perl One-liner de-compile?

2005-04-25 Thread Charles K. Clarkson
Larsen, Errin M HMMA/IT mailto:[EMAIL PROTECTED] wrote: : Or is the @f array a secret array I'm not cleared to know about? We could tell 'ya, but then we'd have to kill 'ya. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Perl One-liner de-compile?

2005-04-25 Thread Jeff 'japhy' Pinyan
On Apr 25, Larsen, Errin M HMMA/IT said: $ perl -MO=Deparse -ane 'print pop(@F), \n;' Note the @F, it's capital-F. # perl -MO=Deparse -nae 'print $f[4]' /some/directory/somefile You're using a lowercase @f here. LINE: while (defined($_ = ARGV)) { our(@F) = split( , $_, 0); print $f[4];

RE: Perl One-liner de-compile?

2005-04-25 Thread Larsen, Errin M HMMA/IT
-Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 2:42 PM To: Larsen, Errin M HMMA/IT Cc: beginners@perl.org Subject: RE: Perl One-liner de-compile? SNIP You're using a lowercase @f here. SNIP Perl will magically

Re: Perl One-liner de-compile?

2005-04-25 Thread John W. Krahn
Larsen, Errin M HMMA/IT wrote: Ok ... So I tried this: # perl -MO=Deparse -nae 'print $f[4]' /some/directory/somefile ^ LINE: while (defined($_ = ARGV)) { our(@F) = split( , $_, 0); print $f[4]; ^ } -e syntax OK