Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: option control in script

by Corion (Patriarch)
on Jul 22, 2018 at 06:18 UTC ( [id://1219036]=note: print w/replies, xml ) Need Help??


in reply to option control in script

The easy way is to look at B::Deparse and use the code that Perl writes for you in the background:

perl -MO=Deparse -lane "print $F[2]"
BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined($_ = readline ARGV)) { chomp $_; our @F = split(' ', $_, 0); print $F[2]; }

So, the line

our @F = split(' ', $_, 0);

basically is the -a command line switch.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found