- or download this
getopts("hf:d:") || die HELP();
...
{
HELP();
}
- or download this
use vars qw/$opt_h $opt_f $opt_d/;
- or download this
{
my %opt;
...
if( opt_j ) { # compile time error
...
}
- or download this
sub opt_f {
if( not exists $opt{f} ) {
...
$opt{f}
}
}
- or download this
(my $new = $old) =~ s/foo/bar/;