in reply to Command line argument
This does what you want, but your users have to know about Ctrl-D:
Note that the comma after print() is the sequence operator here.my $argument = $ARGV[0] || (print( "Parameter? "), (<>)[0]); chomp $argument;
Update: chomped at ++tadman's suggestion. Also, this removes the Ctrl-D problem:
my $argument = $ARGV[0] || (print( "Parameter? "), <>); chomp $argument;
After Compline,
Zaxo
|
|---|