Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: script fixstyle from cookbook

by erroneousBollock (Curate)
on Nov 08, 2007 at 06:30 UTC ( [id://649658]=note: print w/replies, xml ) Need Help??


in reply to script fixstyle from cookbook

Never seen while being used inside of qutation while being assign to $code(on line 11)
while is not being used "inside" a quotation... $code is just a string being used to build up some code which will be evaluated with eval.

In this case, what is $code in line 17?
Depends on what's in the __DATA__ segment.

What does "quoting metacharacters" mean? I understand what metacharacter is(special character such as $ or ^) but just what is quoting metachracter mean??
Metacharacters in this example are characters which have special meaning in a regular expression, such as ] [ } { ) ( ^ $. See regular expressions.

Since the loop is building code to be evaluated, it needs to escape regexp metacharacters so that they'll be correct after the eval.

-David

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (8)
As of 2024-04-18 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found