in reply to Command line argument

Do exactly what you've just said. If no parameter specified to your program, just request the user for input. And unless there's no input either, simply quit the program then ;)
my $foo_arg = $ARGV[0]; # or just shift(); unless ($foo_arg) { print "Foo arg is missing! Please enter:\n"; $foo_arg = <STDIN>; chomp($foo_arg); die "Alright, i'm just quitting this one!" unless $foo_arg; }


_____________________
$"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+) +-.*)$/; $_=["ps -e -o pid | "," $2 | "," -v "," "];`@$_`?{print"+ $1"}:{print" +- $1"}&&`rm $1`; print$\;}

Replies are listed 'Best First'.
Re: Re: Command line argument
by Anonymous Monk on Jun 03, 2002 at 13:40 UTC
    Thanks for all of your quick responses!!
    Now the script works.