Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: How to interpolate CONSTANTS in Here docs?

by Anonymous Monk
on Feb 11, 2015 at 22:49 UTC ( [id://1116405]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to interpolate CONSTANTS in Here docs?
in thread How to interpolate CONSTANTS in Here docs?

[...] builds a reference to an anonymous array, which is in turn de-referenced by @{...}. It's roundabout, but necessary in this case because the constants built by constant are actually functions, like sub OUT_DIR () { 'out' }, and a function call like OUT_DIR() (or OUT_DIR) isn't interpolated in strings, while scalars ($foo) and arrays (@bar) are, including dereferenced arrayrefs (@{$arrayref} - see e.g. Using References).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-20 15:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found