sub add_two { my @in_values = @_; if( wantarray ) { #must use +0 to force scalar #otherwise we get deep recursion return map add_two( $_ ) + 0, @in_values; } else { return $in_value[0] + 2; } }
In reply to (ichimunki) Re x 2: Should we handle multiple arguments as a list?
by ichimunki
in thread Should we handle multiple arguments as a list?
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |