$ perl -e 'for my $c (1..10) {print_square($c)}; sub print_square{my $ +d = shift; print $d*$d, "\n";}' 1 4 9 16 25 36 49 64 81 100
In reply to Re: Subroutine & For loop
by Laurent_R
in thread Subroutine & For loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |