in reply to Passing functions etc into hashes

When assigning values to a hash you are in array-context. This can (will!) change the output of some functions, and may (will!) cause great confusion.

You don't say what goes wrong - so I may be barking up the wrong tree (in the wrong forrest possibly).

Replies are listed 'Best First'.
Resolved - Sorry to Trouble You
by George_Sherston (Vicar) on Sep 17, 2001 at 13:27 UTC
    Ah. Often I only realise what's really going on in my life by acting on the assumption that it's actually something different. Don't try this at home, kids, as it may end up with you living in the wrong country, with the wrong number of internal organs, married to a person of the wrong sex. THEN you'll know. Lucky for me, the present instance was not so earth-shattering. But I found out it wasn't to do with passing functions into hashes. They calculate fine in hashes, and my preferred method set out above DOES actually work. So - sorry to waste your time; but thanks for providing a sounding board which obliged me to formulate my problem, and then challenged me to determine whether it was a problem or not. One day I'll be able to do this for myself...

    § George Sherston
(tye)Re: Passing functions etc into hashes
by tye (Sage) on Sep 18, 2001 at 03:54 UTC

    I wish => would force scalar context upon both of its operands...

            - tye (no, really, that is all I have to say on this)