in reply to Splitting strings with enclosed delimiters

How about this:
use Text::ParseWords; use strict; while(<DATA>){ my @line=quotewords(" ",0,$_); print join"\n",@line; } __DATA__ "72 3267S" "S2079" 1 no "72 0250" "S3011" 1 no "72 8351S" "S6101" 1 no "72 17082S" "S6108" 1 no

-Jason

Replies are listed 'Best First'.
Re: Re: Splitting strings with enclosed delimiters
by dsheroh (Monsignor) on Oct 03, 2002 at 18:40 UTC
    Very slick and just as straightforward as a split (although quotewords isn't as obvious about what it does). Thanks!