- or download this
use vars qw($VAR2);
...
my $var2 = $input_ref->{var2} || $VAR2;
...etc...
}
- or download this
sub routine {
my $input_ref = {@_};
my $do_this = $input_ref->{do_this} || 1;
}
- or download this
my $do_this = 0;
if ($input_ref->{do_this} eq '0') {
...
else {
$do_this = 1
};