in reply to When is an ^$ not a ^$ ?
open (FILE,"<$input_file") or die "Couldn't open file $input_file, $!\ +n"; while (<FILE>) { chomp; if ($_) { $entry .= "$_\n"; } else { push @data, $entry; $entry = ""; } } close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: When is an code^$/code not a code^$/code?
by Clownburner (Monk) on Apr 05, 2001 at 06:02 UTC |