From: tsawyer@... Date: 2004-12-07T05:27:37+09:00 Subject: Re: String#split behaves odd James Edward Gray II wrote: > On Dec 6, 2004, at 1:20 PM, Simon Strandgaard wrote: > > > However Perl has a bad split. > > > > $size = split(/\n/, ""); > > print "size is $size"; # -> 0 > > Perl's split() works as you described above. You just need to call it > in "list context": > > @arr = split /\n/, ""; > # ... Try @arr = split /\n/, -1; Which I think should be defualt behavior. T.