in reply to Re^2: Shorten the headers of a file and remove empty lines using perl
in thread Shorten the headers of a file and remove empty lines using perl
foreach my $line ( <$input_fh> )
should be
while (my $line = <$input_fh> )
The first form is a glob, (but I don't know well enough to explain it to you).
The second line should work properly for reading your file.
Update: Yes Choroba is correct, it is not a glob - my mistake,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Shorten the headers of a file and remove empty lines using perl
by choroba (Cardinal) on Jun 13, 2013 at 23:30 UTC | |
Re^4: Shorten the headers of a file and remove empty lines using perl
by Preceptor (Deacon) on Jun 14, 2013 at 20:29 UTC |
In Section
Seekers of Perl Wisdom