On Apr 10, Richard Heintze said:
You have to pass the array by reference, then.
my array = (1 .. 4);
print "(array)\n"; # (1 2 3 4)
my_func(\array);
print "(array)\n"; # ()
sub my_func {
my $array_ref = shift;
$array_ref = ();
}
--
Jeff "japhy" Pinyan com http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
CPAN ID: PINYAN [Need a programmer? If you like my work, let me know.]
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
Bookmarks