If your data is not supposed to have spaces in it you could say:

$record = split / +/, $line;

" +" is regexp for "one or more spaces.

What you really need to do is understand why your field seperator
changes halfway through the month.

On 01 Jun 2001 23:19:24 -0700, Paul Fontenot wrote:
> I have a file that for 1/2 the month has one space between every word, I use
> this to split. However the other half the month it has two spaces in one
> place and all the rest have one space.
> 
> Using s/ /#/g to change all spaces to # so I can use that for the split
> doesn't work. How can I get the back to back spaces to be something else?
> 
> -Paul
> 
> 

-- 
Today is Pungenday, the 7th day of Confusion in the YOLD 3167
Grudnuk demand sustenance!


Reply via email to