develooper Front page | perl.perl5.porters | Postings from December 2007

Re: Changes in m//m in 5.10

Thread Previous
December 23, 2007 04:35
Re: Changes in m//m in 5.10
Message ID:
demerphq schreef:

> $qr=/^foo/;

ITYM: $qr = qr/^foo/; 

Or does /.../ imply qr in perl 5.10? 
(wouldn't be bad) 

> $x=~/$qr/m; # warns;

Or does this also warn if $qr isn't a compiled regex? 

> $x=~/$qr|foo/m; #does not warn
> $x=~/$qr/x;  # does not warn (/x doesnt change match semantics)

That is all quite hard to read with so little whitespace. 

Affijn, Ruud

"Gewoon is een tijger."

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