The problem is that the regexp contains a \( and \). Perl thinks the backslashes are there to escape the braces while parsing the qr() construct and "removes" them from the regexp. Compare:
perl -MO=Deparse -e "$regexp = qr(\s+execution\s+time\s+\(\s+millis\s+ +\)\s+\:\s+);" and perl -MO=Deparse -e "$regexp = qr/\s+execution\s+time\s+\(\s+millis\s+ +\)\s+\:\s+/;"
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
In reply to Re: qr delimiter question
by Jenda
in thread qr delimiter question
by nr0mx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |