Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


pulling specific values from hash

kwnkwn Posts: 1
Howdy I'm a beginner so my question is probably dumb but I appreciate any help thanks.
The problem I have here is that i need to grab a specific value of the [color=Grey]%locs[/color] hash based on what [color=Blue]my[/color] [color=Orange]$loc[/color] =
As you can see [color=Blue]my[/color] [color=Orange]$loc[/color] = so if the input is: "one" at the second prompt then i need the 'c$files' value

[color=Blue]my[/color] [color=Grey]%locs[/color] = (one => 'c$files', two => 'd$stuff', three=> 'd$ hings');
[color=Blue]my[/color] [color=Grey]%servers[/color] = (ksl => '\server1', krf => '\server2');

[color=Blue]my[/color] [color=Orange]$server[/color] = ;
[color=Blue]chomp[/color] [color=Orange]$server[/color];
[color=Blue]my[/color] [color=Orange]$loc[/color] = ;
[color=Blue]chomp[/color] [color=Orange]$loc[/color];

Sign In or Register to comment.