pglenski has asked for the wisdom of the Perl Monks concerning the following question:
I'm very new to perl. I have a two dimensional array, say $tmp[0][0], etc. I want to pass just one dimension at a time to a subroutine. $tmp[0]... &my_subroutine($tmp????)
How is that done so that the subroutine can examine it as $tmp[0], $tmp[1], etc?
sub my_subroutine($) { my @tmp_arry = @_; print $tmp_arry[0]; ... }
Edited by Chady -- moved text outside code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing array
by jeffa (Bishop) on Jul 20, 2004 at 20:00 UTC | |
|
Re: passing array
by stajich (Chaplain) on Jul 20, 2004 at 19:37 UTC | |
|
Re: passing array
by gaal (Parson) on Jul 21, 2004 at 05:42 UTC |