develooper Front page | perl.perl5.porters | Postings from August 2010

Re: RFC: New regex modifier flags

Thread Previous | Thread Next
From:
Paul LeoNerd Evans
Date:
August 4, 2010 01:56
Subject:
Re: RFC: New regex modifier flags
Message ID:
20100804085618.GZ11110@cel.leo
On Wed, Aug 04, 2010 at 09:12:31AM +0200, H.Merijn Brand wrote:
> 7) use a currently unsupported syntax with non-ascii characters that
>    has no conflicts:

(I suspect you meant "non-letter" rather than "non-ascii" :) )

>    $a =~ m{pattern}msi_Cu_x
> 
> $ perl -we'$a =~ m{foo}msi_'
> Bareword found where operator expected at -e line 1, near "m{foo}msi_"
> syntax error at -e line 1, next token ???
> Execution of -e aborted due to compilation errors.

That actually has a certain neatness to it; it's similar to the use of
"--" for GNU-style long options, given as previously all getopt-style
options were -[letter], or -- on its own to indicate the end.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About