Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by ikegami (Pope)
on Feb 16, 2015 at 02:15 UTC ( #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
Node Status?
node history
Node Type: note [id://1116836]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2020-04-06 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (36 votes). Check out past polls.

    Notices?