Pod::Usage is handy too.use strict; use warnings; use Getopt::Long; my $lfile; my $bfile; GetOptions ( 'l=s' => \$lfile, 'b=s' => \$bfile ) or die; die "Unexpected args: @ARGV" if @ARGV; die "Must specify -l or -b" unless $lfile or $bfile;
In reply to Re: How to make sure to print usage when the options are not entered?
by toolic
in thread How to make sure to print usage when the options are not entered?
by perl_mystery
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |