in reply to Closures question

Ho, ho! Hah! Chuckle...laugh... snicker... sob.

Behold, ye mighty, and despair! I am OVID, the idiot!!!

btrott put me on the right path. I wasn't storing the coderef in a hash key, but I had accidentally stringified it.

Basically, I was trying to abstract out bits of synthetic code in my program so that the main parts were nice and clear. In the process, I forgot to remove one, teeny, weeny line:

$toggle ^= 1;
Needless to say, do a bitwise XOR on a coderef is not my most brilliant coding.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just go the the link and check out our stats.