in reply to file reading issues
as$line = <FILENAME>; while ($line ne "") { print "$line"; $line = <FILENAME>; }
if the expected behavior is to print out every line of the file.while (<FILENAME>) { print ; }
One way to tweak the above to get your desired output is as follows:
while (<FILENAME>) { last if /<!-- Begin -->/; } while (<FILENAME>) { last if /<!-- End -->/; print ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: file reading issues
by bofh_of_oz (Hermit) on Aug 03, 2005 at 19:35 UTC | |
|
Re^2: file reading issues
by mojobozo (Monk) on Aug 03, 2005 at 19:10 UTC |