sub foo { my ($helper)= @_; $helper->(42, "Hello World"); } sub help1 { my ($value, $caption)= @_; print "$caption $value squared is",$value*$value,"\n"; } # main code foo (&help1);
In reply to Re: Passing an array to a subroutine
by John M. Dlugosz
in thread Passing an array to a subroutine
by gisrob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |