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