Try $style1{'a}->[2]

The anonynous arrays are actually array references, hence the need for the
->.

Merrill

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, October 23, 2000 1:07 PM
> To:   [EMAIL PROTECTED]
> Subject:      [perl-win32-gui] hashes/anonymous arrays
> 
> I have a program I wrote (originally for straight command-line type perl) 
> that I'm converting over to use the WIn32::GUI module.  In it, I use 3
> hashes 
> (named %style1, %style2, and %style3), all containing anonymous arrays, to
> 
> house a bunch of strings (the program is for making curses-type text).
> Now, 
> for some reason, in straight perl, the hashes work perfectly, but in the
> GUI 
> one, when I try to access a certain one (for instance, $style1{'a'}[2]),
> it 
> doesnt return anything but a blank string.  Now my best guess as to whats 
> wrong is a name conflict with the hashes, but I changed the names and that
> 
> doesnt seem to quite work, so I'm stuck.  Any ideas?
> 
> -EvanK

Reply via email to