http://qs1969.pair.com?node_id=123108


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