in reply to Re: Look ahead and join if the line begins with a +
in thread Look ahead and join if the line begins with a +
What if the last line is missing its \n?while(chomp(my $line = <NETLIST>)){
Since chomp will return 0 if no characters are removed, it's probably safer to go for the less fun
while(defined(my $line = <NETLIST>)){ chomp;
Edit:Forgot the defined, needed in case of last lines containing only perlish false values, like 0...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What if last line has no LF?
by belg4mit (Prior) on Apr 11, 2002 at 14:07 UTC |