http://www.perlmonks.org?node_id=976729


in reply to I don't understand a piece of this code

The code is doing what you've understood:
$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";
\Q and \E disable special meaning of all metachars in between them. See perlre