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

Re: Access to hash ref element

by AnomalousMonk (Chancellor)
on May 28, 2013 at 19:12 UTC ( #1035687=note: print w/replies, xml ) Need Help??


in reply to Access to hash ref element

... and if you want to interpolate it into a string before you print it, such scalar elements of arrays and hashes, however deeply nested or directly or indirectly referenced, interpolate like any other scalar:

>perl -wMstrict -le "my $data = [ {'name' => 'Mary'} ]; ;; print qq{---$data->[0]{name}---}; " ---Mary---

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035687]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-11-22 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (314 votes). Check out past polls.

    Notices?