Here's a trivial example:
sub doit { my ($arg1, $arg2) = @_; print "$arg1 squared is $arg2\n"; } for (0 .. 10) { doit( $_, $_*$_); }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Subroutine & For loop
by roboticus
in thread Subroutine & For loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |