"w0rd" =~ /(\d)/ && $1 ? print"Yes": print"no";
The regex matches, so $1 becomes 0. This makes the condition:
(true) && 0 ? print"Yes": print"no";
Which evaluates to false.
In reply to Re: Re: Re3: $1 trap
by Crackers2
in thread $1 trap
by chunlou
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |