Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: A "simple" question regarding accessing a value in a complex data structure.

by wjw (Deacon)
on Oct 09, 2013 at 07:08 UTC ( #1057493=note: print w/ replies, xml ) Need Help??


in reply to A "simple" question regarding accessing a value in a complex data structure.

Try this,

use strict; use warnings; my %tgs = ( 'articles' => { 'Java' => 'How to Program in Java', 'Perl' => 'Perl Programming for Biologists', 'Python' => { 'Programming' => q/Expert's Guide to Scala/ +, }, }, 'eBooks' => { 'Linux' => q/Linux: A Beginner's Guide/, }, ); print $tgs{articles}{Python}{Programming};
Hope that helps,
...the majority is always wrong, and always the last to know about it...
Insanity: Doing the same thing over and over again and expecting different results.


Comment on Re: A "simple" question regarding accessing a value in a complex data structure.
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (15)
As of 2014-10-31 19:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (223 votes), past polls