in reply to How to make sure to print usage when the options are not entered?
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;
|
|---|