Emanuele Osimo wrote:
Hello there, I'd like to read a file thet is a list of numbers like: 3084 4855 2904 making each line (each number) one of the elements of the array. I've tried foreach my $line (<FILEHANDLE>){ push (@array, $line) } but then printing the array just gives me the last number, in this case "2904". What's wrong?Thanks Emanuele
A simpler method is: @array = <FILEHANDLE>; -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Regardless of how small the crowd is, there is always one in it who has to find out the hard way that the laws of physics apply to them too. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
