Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: quotes in Perl (opinionated note on coding style)

by hv (Parson)
on Feb 10, 2005 at 14:56 UTC ( #429749=note: print w/ replies, xml ) Need Help??


in reply to Re: quotes in Perl (opinionated note on coding style)
in thread quotes in Perl

Hmm, so instead of ensuring some variables are not interpolated by replacing "$foo" with "\$foo", you instead ensure the other variables are interpolated by replacing "$bar" with "^.$bar.q^".

That doesn't seem like such a good trade to me.

Hugo


Comment on Re^2: quotes in Perl (opinionated note on coding style)
Select or Download Code
Replies are listed 'Best First'.
Re^3: quotes in Perl (opinionated note on coding style)
by TimToady (Parson) on Feb 10, 2005 at 17:36 UTC
    It can be a good trade if most of your variables are uninterpolated. In that case you want the unusual form to be the "marked" form, which helps prevent mistakes. That's the justification for Perl 6's version of the same trick, only it's spelled \qq[$bar] there.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-30 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls