Perl Whitespace Reg Expression
Bill Campbell
linux-sxs
Sun Oct 9 13:15:45 PDT 2005
On Sun, Oct 09, 2005, Collins Richey wrote:
>On 10/9/05, Bill Campbell <linux-sxs at celestial.com> wrote:
>
>>
>> my @line = split('\s', $_);
>>
>
>Just a minor nitpick. I use
>
> my @line = split('\s+', $_);
>
>To account for one or many whitespaces.
Right! My perl's getting rusty as I've been doing most of my
development in python for the last year or so (with lots of
commented curly braces to make vi's % key happy :-).
Bill
--
INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC
UUCP: camco!bill PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/
"A man full of faith is simply one who has lost (or never had) the capacity
for clear and realistic thought. He is not a mere ass; he is actually ill.
Worse, he is incurable."
H.L. Mencken
More information about the Linux-users
mailing list