in reply to I don't understand a piece of this code
The code is doing what you've understood:
\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 Section
Seekers of Perl Wisdom