Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: I don't understand a piece of this code

by cheekuperl (Monk)
on Jun 18, 2012 at 03:25 UTC ( #976729=note: print w/ replies, xml ) Need Help??

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

Comment on Re: I don't understand a piece of this code
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976729]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2015-11-26 19:00 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (706 votes), past polls