David Newman wrote:
> Greetings. I have a newbie question about passing arrays into a subroutine
> (and getting return values as well).
Hi David,
I can't help much as far as passing or returning whole arrays, but there is a much
better way to access arrays from inside a function. I'll show you
You need to pass the array to the function by reference, here's the fix.
&spin([EMAIL PROTECTED]);
sub spin
{
$arr = shift;
for (; $count > 0; $count--)
{
push(@$arr, $start++);
}
}
but if all you want to do is to populate your array with value between
1025 to 1035, here's a clean