[LA.pm] push question
Robin Rowe
rower at MovieEditor.com
Thu Mar 3 22:24:57 PST 2005
Hi. Having a little trouble with 'push' not doing what I'd hoped.
I'm reading an array from a file:
@lines = <FILE>;
I want to append some additional data to the array, but it doesn't do what I
expect.
Here's a test program that illustrates what I'm doing.
@lines={1,2,3};
push(@lines,4);
push(@lines,5);
foreach(@lines)
{ printf "%s-", $_
}
Here's the output:
% perl pushtest.pl
HASH(0x334ca0)-4-5
What I want is 1-2-3-4-5. How?
Thanks!
Robin
-------------------------------------------------------------------
Robin.Rowe at MovieEditor.com Beverly Hills, California
www.LinuxMovies.org - Advancing Linux motion picture technology
More information about the Losangeles-pm
mailing list