in reply to Parse text file for number
If it's more complicated than that (multiple numbers per line), then you can use a split on each line you read from the file to extract numbers one at a time.my $number; open FILE, "<", "/path/to/your/file" or die; while ($number = <FILE>) { # read in a line of the file chomp $number; # remove the newline # do something with each number } close FILE;
Hope that helps ..
-- Foxcub
#include www.liquidfusion.org.uk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (2) Parse text file for number
by woofoz (Initiate) on May 20, 2003 at 10:43 UTC |