http://qs321.pair.com?node_id=119716


in reply to Help with Text::ParseWords

In addition to the two corrections by others, your textfile.dat is not in a suitable format. You are telling quotewords that you want to use spaces as a delimiter, but your textfile.dat has records which aren't seperated by spaces "Leppala"01261907 does not have a space in it. "Saukville""WI" doesn't either which will result in you getting Leppala01261907 and SaukvilleWI as records.

Replies are listed 'Best First'.
Re: Re: Help with Text::ParseWords
by basicdez (Pilgrim) on Oct 18, 2001 at 20:01 UTC
    Thanks. I have resolved that problem and actually have it working now. For future reference though, do you have any suggestions on how to seperate "Leppala"01261907 or "Saukville""WI" If not though that is cool as I have it working properly now. peace dez L
      If you are unconcerned about escaped quotes ("George \"The Man\" Washington") a quick way would be to set $keep to 1
      &quotewords('\s+', 1, $_);
      and then split on quotes.