Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^7: array in hashes

by AnomalousMonk (Archbishop)
on Jul 29, 2011 at 15:37 UTC ( [id://917489]=note: print w/replies, xml ) Need Help??


in reply to Re^6: array in hashes
in thread array in hashes

Further to JavaFan's point about clarity, there's also no need to go overboard using concatenation for complex hash or array values in a string. They will interpolate just fine:

>perl -wMstrict -le "my %hash = ( a => [11,22], b => [33,44], ); my $hashref = { c => [55,66], d => [77,88], }; ;; print qq{$hash{a}[0] $hash{b}[1] $hashref->{d}[1]}; " 11 44 88

Log In?
Username:
Password:

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

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

    No recent polls found