# And for something completely different... sub foo { if (1 != @_) { return map $foo($_), @_; } # body of foo here. return $whatever; } #### sub foo { map { # body of foo here. $whatever } @_ } #### sub foo { (map { # body of foo here. $whatever } @_)[0..$#_]; } #### sub foo { my @ret = map { # body of foo here $whatever; } @_; @ret[0..$#ret]; }