- or download this
print int rand $x;
- or download this
return if substr($x, 0, 2) eq substr($y, 0, 2); # Second pair not ne
+eded.
- or download this
my $first = first { $x > 0 } @array; # List::Util
- or download this
is_deeply $response->{content}, bag(1 .. 10); # Test::Deep
- or download this
$object->frobnicate;
- or download this
use Exporter qw{ import }; # sub name
my $from_roman = {qw{ I 1 II 2 III 3 IV 4 V 5 }};
my $primes = [qw[ 2 3 5 7 11 13 17 19 ]];
- or download this
while (my $item = $iter->next) {
- or download this
chomp( my @lines = <> );
- or download this
my $first = $array[0];
my $middle = $array[ $#array / 2 ];
- or download this
my $arr = [1, 2, 3];
my @directions = qw( left right );
my @items = @{ $ref{items} };
- or download this
if ($x > 0) {
say 'Positive';
} elsif ($x < 0) {
...
} else {
say 'Zero';
}
- or download this
my @planets = qw( Mercury Venus Earth Mars
Jupiter Saturn Uranus Neptune );
- or download this
while ($x = $iter->next) {
next if $x > $threshold;
$x -= $correction;
}
- or download this
return if $x > $threshold;
return if $err || ! $success;
return [] if $not_found;
my $result = count($x);
- or download this
my @normalised = map lc, @words;
- or download this
my %pairs = map { $_ => value($_) } @labels;
- or download this
sub new {
my ($class, $name) = @_;
return bless { name => $name }, $class
}
- or download this
__PACKAGE__
- or download this
sub second { $_[0][1] }