Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Perl hash keys not considered unique

by huck (Prior)
on Apr 23, 2018 at 13:18 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1213426]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found