- or download this
sub foo{ print join "-",@_};
my @array=qw(a b c d e);
foo(scalar @array,"Bar");
- or download this
sub my_scalar {
my $count=0;
$count++ foreach @_;
return $count;
}
- or download this
sub listy(\@){
print join("*",@{$_[0]}),"\n";
}
listy @array;
- or download this
sub assert ($;$) {
unless($_[0]) {
...
}
return undef;
}
- or download this
assert @array,"Array must have elements within";
- or download this
assert scalar @array,"...";