sub doit { my ($arg1, $arg2) = @_; print "$arg1 squared is $arg2\n"; } for (0 .. 10) { doit( $_, $_*$_); }