\Q and \E disable special meaning of all metachars in between them. See perlre$what = "[box]"; foreach (qw(in[box] out[box] white[sox])) { #Assign to $_, one by one, + each value in parenthesis if (/\Q$what\E/) { print "$_ matched!\n";
In reply to Re: I don't understand a piece of this code
by cheekuperl
in thread I don't understand a piece of this code
by Socrates440
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |