Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl hash keys not considered unique

by huck (Parson)
on Apr 23, 2018 at 13:18 UTC ( #1213426=note: print w/replies, xml ) Need Help??


in reply to Perl hash keys not considered unique

You are assuming that $files{'ENV.FILESOURCE.SOURCE.J2018059.N000001'} and $files{'ENV.FILESOURCE.SOURCE.J2018058.N000001'} point to unique hashs. but what if there was somewhere above this section a line that said:

$files{'ENV.FILESOURCE.SOURCE.J2018059.N000001'}=$files{'ENV.FILESOURC +E.SOURCE.J2018058.N000001'};
while there would be an entry in $files for both names, they would both point to the same hash, so modifying either $files{'ENV.FILESOURCE.SOURCE.J2018059.N000001'}{data} or $files{'ENV.FILESOURCE.SOURCE.J2018058.N000001'}{data} would mean that the same end data location has been modified.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2020-11-27 18:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?