|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Interrogating stashes - Camel example doesn't work?by stevieb (Canon) |
| on Jul 24, 2025 at 19:10 UTC ( [id://11165775]=note: print w/replies, xml ) | Need Help?? |
|
You're close, but you have to dereference the symbol table entry appropriately, not use it directly as a local variable. The array/hash doesn't get magically created:
Output:
Here's a bit of an example using the actual entries:
Disclaimer: Please note that using the symbol table directly can be extremely dangerous. You can cause slight or even major problems in very far away code that can be a nightmare or even impossible to track down. This is a very relevant read. It doesn't go into symbol table use directly, but the premise is exactly the same. I find all three parts to be an extremely entertaining and funny read, and it's always nice every couple of years when I have to reference it, as I re-read it each time. --stevieb
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||