sub apply(&@) { ## ack, Class::Multimethods doesn't do variadic args :-/ return if @_ == 1; my($func, $head, @tail) = @_; local $_ = $head; return $func->(), apply($func, @tail); } my @squares = apply { $_ * $_ } 2 .. 5; print join(', ', @squares), $/; __output__ 4, 9, 16, 25