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];
 }
 -e syntax OK

Perl will magically produce the @F array for you, as shown. It's up to YOU not to make the typo.


--
Jeff "japhy" Pinyan         %  How can we ever be the sold short or
RPI Acacia Brother #734     %  the cheated, we who for every service
http://japhy.perlmonk.org/  %  have long ago been overpaid?
http://www.perlmonks.org/   %    -- Meister Eckhart

--
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