>>>>> "JG" == Josh Goldberg <[EMAIL PROTECTED]> writes:
JG> How about this? JG> return grep(/./s, $$bufref =~ m#(.*?)(?:$sep|\z)#gs) if wantarray; check that on an empty file. it needs to return a null string for that. the grep will fail there. and i don't want to filter it through grep as that will slow it down. as i said, it is trickier than meets the eye. that is why i settled on the split with lookbehind as it works properly in all the corner cases. uri -- Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org