in reply to I don't understand a piece of this code
The next think you need to know is that \Q and \E are allowing you to use the content of the variable $what as literal text without interpreting any special characters, which in this case are the square brackets. Have a look at perlre to see what [box] means inside a regular expression.
So in summary it is looking for the string [box] including the square brackets, withing the 3 separate strings in[box], out[box], and white[sox], and prints matches.
--
I'd like to be able to assign to an luser
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: I don't understand a piece of this code
by bitingduck (Deacon) on Jun 18, 2012 at 03:49 UTC |