Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: command line arg help

by mkmcconn (Chaplain)
on Nov 04, 2001 at 03:16 UTC ( [id://123108]=note: print w/replies, xml ) Need Help??


in reply to command line arg help

Try:
$ who | myprog -r -

update
Actually, I shouldn't let this go without recommending that you try Getopt.
And it may be that you meant to write something like:

elsif ($ARGV[0] =~ m/^-r$/){ $option = shift @ARGV; &doit($_) for <STDIN>; }
... but I wasn't sure that's what you meant.
No endorsement of this method implied.
mkmcconn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found