Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: a simple one

by Tanalis (Curate)
on Nov 03, 2002 at 13:05 UTC ( [id://210045]=note: print w/replies, xml ) Need Help??


in reply to Copying hash contents, from nested hash (was: a simple one)

So, basically, you need to rehash the hash you have on service, and assign the value to it?

The way I'd go about doing that (I'm sure there's a better way) would be something like .. (untested code)

my $servicehash; foreach my $cookie (keys %hash) { foreach my $service (keys %{$hash{$cookie}}) { $servicehash{$service} = $hash{$cookie}{$service}; } }

That should leave you with a hash of values keyed on service.

Hope that helps ..
--Foxcub

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found