develooper Front page | perl.beginners | Postings from May 2008

Re: another help on input record separator clarity please

Thread Previous | Thread Next
From:
Dr.Ruud
Date:
May 4, 2008 11:30
Subject:
Re: another help on input record separator clarity please
Chas. Owens schreef:
> Dr.Ruud:

>>       $value{ $1 } = $2 while m/^(\S+)[[:blank:]]+(\S+)/mg;
>>  or even
>>       $value{ $1 } = $2 while m/^(\S+)[[:blank:]]*(\S*)/mg;
>
> Is there a reason I am missing to use [[:blank:]] over [ \t]?

The [:blank:] matches (at least) 18 codepoints. unicount.pl:
http://www.nntp.perl.org/group/perl.perl5.porters/2007/02/msg121080.html

I prefer some of the named ones, like [:blank:] and [:punct:] and
[:xdigit:].

-- 
Affijn, Ruud

"Gewoon is een tijger."


Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About