For something like this, I would probably inspect the @ARGV array and call a usage() subroutine if:
Update: Dang! Beat to the punch by ikegami! :)
A sample usage() subroutine might look like this:
sub usage { die "You must specify an input file.\nUsage: $0 <file_name>\n"; }
In reply to Re: Returning an error message when <STDIN> is not in use
by ptum
in thread Returning an error message when <STDIN> is not in use
by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |