Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Using multi-level hashes

by ioannis (Vicar)
on Oct 29, 2005 at 01:28 UTC ( #503821=note: print w/ replies, xml ) Need Help??


in reply to Using multi-level hashes

Your readItem() subroutine suggests the need for access to values without much typing. If you also desire to assign new values, why not use an alias? Like so:

*label= \$project{$activeProject} {components} {Software} {subComponents} {Database} {label} ;

You read the value using print $lable;, and assign a new value using '$label='Test-2'; .

This is a lot shorter than the OP which exhibited the full train of variables, and was coded like this:

$project{$activeProject} {components} {Software} {subComponents} {Database} {label} = 'Test-2';


Comment on Re: Using multi-level hashes
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-30 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls