Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Copy an hash modifying some selected values

by Discipulus (Monsignor)
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 musing on the Monastery: (5)
As of 2019-02-19 17:24 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (105 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!