- or download this
"o|c|out=s" => \my $csv;
- or download this
GetOptions ("length=i" => \$length, # numeric
"file=s" => \$data, # string
"verbose" => \$verbose) # flag
- or download this
sub GetOptions {
my %options = @_;
# ...
}
- or download this
my $sref = \my $scalar;
- or download this
my $scalar;
my $sref = \$scalar;
- or download this
my %hash = (
some_key => \my $value,
# ...
);
- or download this
my $value;
my %hash;
$hash{some_key} = \$value;
- or download this
($csv) and ($xls = $csv);
- or download this
$xls = $csv if $csv;
- or download this
sub foo {
my $value = rand(5);
return $value > 2 or die "Value was not greater than 2.\n";
}
- or download this
sub foo {
my $value = rand(5);
return($value > 2) or die;
}
- or download this
sub foo {
my $value = rand(5);
return $value > 2 || die;
}
- or download this
sub foo {
my $value = rand(5);
return ( ($value > 2) || die );
}