sub add{ shift(@_) + (@_? add(@_):0) } #Test the "add" routine .. print add(qw/3 0 0 1 0 1 01 1 1 1 1 0 1 /); # Outputs : # 11
"Income tax returns are the most imaginative fiction being written today." -- Herman Wouk
In reply to Re: subroutines problem
by NetWallah
in thread subroutines problem
by newly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |