chibiryuu has asked for the wisdom of the Perl Monks concerning the following question:
Either one of these changes:$T = qr//; $U = qr//; $_ = "12"; /(1)(2)/; my ($t, $u) = ($1, $2); print $t =~ /$T/ ? "pass1, " : "fail1, "; print $u =~ /$U/ ? "pass2\n" : "fail2\n";
$T = qr/./;
causes the program to print "pass1, pass2".print $t =~ /(?:$T)/ ? "pass1, " : "fail1, ";
|
|---|