Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Allocation of anonymous arrays

by LanX (Saint)
on Feb 08, 2014 at 16:19 UTC ( [id://1074040]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Allocation of anonymous arrays
in thread Allocation of anonymous arrays

I agree about encapsulation, thats why I mentioned Tie::Hash after demonstrating the raw mechanics in a REPL.

If tied or functional or OO or whatever interface... YMMV! :)

Anyway we are again speculating about the OPs real intention, he just showed us enough to think it's pointless for most thinkable motivations.

So pointless that Perl could/should warn about using literal arrays or hashes as keys...

update

tl;dr ...

I just used a reverse in my example to avoid triviality with a minimal amount of code, it was a workaround not a goal.

The general problem is to use complex data-structures as keys, see also Using hashes for set operations... for a similar discussion.

Cheers Rolf

( addicted to the Perl Programming Language)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found