note
BazB
<p>
A subroutine gets it's arguments as an array (<code>@_</code>), so if you do
<code>
my @array = (1,2,3,4,5);
some_sub(@array);
</code>
Within some_sub, <code>@_</code> will equal the contents of <code>@array</code>.<br />
However, you probably want to pass the array into the subroutine by reference (see [perlref] for more):
<code>
my @array = (1,2,3,4,5);
some_sub( \@array );
</code>
In that case, the first element of <code>@_</code>, the argument list to some_sub, will be a reference to <code>@array</code>.
</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-127547">
<hr />
<font size=1>
<p align=right>If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.<br>
That way everyone learns.</p>
</font>
</div></div>
439926
439926