On Mon, 10 Feb 2003 11:09:25 +1100 (EST), [EMAIL PROTECTED] wrote: >Yitzchak Scott-Thoennes wrote: >> Sigh. I'd call that a bug if someone hadn't gone to the trouble to >> test for it and document it. (Indeed, I see a bug report out there: >> #6653, was 20010327.008.) So do something like: >> >> my @lines; >> chomp(my $tmp=$x); >> @lines = split /\n/,$tmp,-1 or @lines="" > >This one fails for $x = "" producing a @lines with one element.
Only if you say $x eq "" means no lines instead of one empty line missing its "\n" :)
