|Perl: the Markov chain saw|
Creating a hash with key generated by a sub?by smullis (Pilgrim)
|on Nov 12, 2004 at 12:53 UTC||Need Help??|
smullis has asked for the
wisdom of the Perl Monks concerning the following question:
I'm having a problem generating hash keys using a sub. I'm pretty sure that this is a syntactic error and while I could easily "do it another way" I'm just curious as to why this occurs....
Let's set it all up:
Here's the sub function:
This works great...
Not this though:
Whereas, here we have no problem...
Anyone care to help me understand what's going on here? I intuitively think it should be fine.... which is why I ask...
Many thanks in advance,