Keep It Simple, Stupid | |
PerlMonks |
Re: strip multiple spacesby chromatic (Archbishop) |
on Aug 01, 2000 at 04:45 UTC ( [id://25377]=note: print w/replies, xml ) | Need Help?? |
split takes pretty robust regular expressions. Use the + quantifier to mean "at least one space":
split(/\s+/,$line);
In Section
Seekers of Perl Wisdom
|
|