- or download this
sub my_map {
my $special_thingy = shift;
...
apply($special_thingy, $item);
}
}
- or download this
my ($special_thingy, @list_of_items) = @_;
- or download this
sub my_map {
foreach my $item (@_[1 ..$#_]) {
apply($_[0], $item);
}
}
- or download this
sub my_map {
for (my $i = 1; $i < @_; $i++) {
apply($_[0], $_[$i]);
}
}