- or download this
#!/usr/bin/perl -w
use strict;
...
return scalar @$self;
}
}
- or download this
my ( $a1z, $a2z, $a3z ) = qw( 42 13 666 );
my @az;
...
for ( 1 .. 3 ) {
print "\$a${_}z = $az[$_]\n";
}
- or download this
print "\$a0z = $az[0]\n";
# Array index 0 out-of-bounds at bar.pl line 63
- or download this
use List::Util qw( sum );
my $sum = sum( @az[ 1 .. 3 ] );
print "sum = $sum\n";
- or download this
my $sum = sum( @az );