sub foo { if (1 != @_) { return map foo($_), @_; } # body of foo here. return $whatever; } #### sub foo { ( map { # body of foo here. } @_ )[ 0 .. $#_ ]; }