in reply to Re: A refactoring trap
in thread A refactoring trap
The second while however, will stop as soon as it finds an empty line
Just to test your assertion:
while (my $line = <DATA>) {print $line}; __DATA__ one two three four
results in
one two three four
It seems that empty lines don't break the loop at all.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: A refactoring trap
by redlemon (Hermit) on Aug 17, 2005 at 08:14 UTC | |
by lidden (Curate) on Aug 17, 2005 at 09:53 UTC | |
by revdiablo (Prior) on Aug 17, 2005 at 20:11 UTC | |
by adrianh (Chancellor) on Aug 18, 2005 at 11:46 UTC | |
by revdiablo (Prior) on Aug 18, 2005 at 15:57 UTC | |
by !1 (Hermit) on Aug 17, 2005 at 18:05 UTC |