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 question is, can I get Perl to evaluate a command line (like above)
> and print out the equivalent code that command line will produce?
> 
>   I hope that makes sense.  I thought I saw something similar to this on
> this list before.

$ perl -MO=Deparse -ane 'print pop(@F), "\n";'

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to