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

Re: RFC: New regex modifier flags

Thread Previous | Thread Next
Paul LeoNerd Evans
August 4, 2010 01:56
Re: RFC: New regex modifier flags
Message ID:
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
ICQ# 4135350       |  Registered Linux# 179460

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About