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

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

by ikegami (Patriarch)
on Feb 16, 2015 at 02:15 UTC ( [id://1116836]=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?

If you spread it out,

"foo @{[ F ]} bar"

you get

my @anon_array = F; my $anon_ref = \@anon_array; "foo @{ $anon_ref } bar"

As you can see,

  • @BLOCK (@{ STATEMENTS }) is an array dereference, not "a hash".

  • [ LIST ] is an array constructor, not "an array index". It creates an array, assigns the result of LIST, and returns a reference to that array.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found