Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
anonymous hashes as arguments in Tkby dimmesdale (Friar) |
on Jul 10, 2002 at 23:07 UTC ( [id://180905]=perlquestion: print w/replies, xml ) | Need Help?? |
dimmesdale has asked for the wisdom of the Perl Monks concerning the following question:
I have a Tk callback where I give it as arguments an anonymous hash, like so:
Well, after some experimentation, I realized the placement of how I get at the arguments is VERY important (i.e., if I don't shift the first arg off--an implicit Tk object, in this case a canvas--getting at the other one is a mess). However, even after this, I cannot seem to get at the other argument. I'm getting unitialized errors, so I 'Data::Dumped' it, resulting in this:
Well, I know I have what I want, so its a tricky matter of dereferencing, or what not. I figured it was an anonymous array, so I tried:
How do I get at the data? (incidentally, this is the result of a rewrite of some code I posted before about a solitaire program, viewable on my sketch pad...soon)
Back to
Seekers of Perl Wisdom
|
|