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

Re: Copy an hash modifying some selected values

by Discipulus (Abbot)
on Nov 07, 2018 at 20:45 UTC ( #1225384=note: print w/replies, xml ) Need Help??

in reply to Copy an hash modifying some selected values


> I would want to check only these values...

If you already have the list, just process it...

for ( $hash1{key1}, $hash1{key2}{key22}, $hash1{key2}{key23} ){ $_ = File::Spec->file_name_is_absolute($_) ? $_ : File::Spec->rel2 +abs($_) }

If you want to copy and modify, just copy the hash and modify the copy. Anyway Data::Diver is a very cool module, but when simpler solutions are use them.


There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Copy an hash modifying some selected values
by Anonymous Monk on Nov 08, 2018 at 08:39 UTC
    Thanks but the list is an input, so I needed something that is tackled as in ikegami's solution.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2020-10-24 21:21 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (247 votes). Check out past polls.