Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: problems with arraysby schumi (Hermit) |
on Jun 20, 2002 at 09:52 UTC ( [id://175945]=note: print w/replies, xml ) | Need Help?? |
Hi.
From your code I assume that your columns have more than one space between them, as you say split (/\s+/, $line) - how sure are you of that? Anyway, I'd do something along the lines of this:
The ^ matches the beginning of a string or line - else you'd strip out occurences of whitespace where you'll need them for your split. This should do the trick, I think. Update: Right after having hit stumbit, I realised that wil was quicker than me - wil++. --cs There are nights when the wolves are silent and only the moon howls. - George Carlin
In Section
Seekers of Perl Wisdom
|
|