in reply to associative array problem
However the source of the problem would be caught by strict.pm. The problem is that you are assigning into slot 1 the string 'mname', and then you are proceeding to access it as if it was an array. (Note, you are using brackets, and not braces.) Perl tries to figure out what you mean by that, and guesses that you want to access the global array @mname. So you overwrite the same array each time and wind up with grief.
My immediate suggestion is that you use strict.pm and study references quick reference. And then be sure to use CGI.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 1: associative array problem
by CharlesClarkson (Curate) on Nov 02, 2001 at 23:04 UTC | |
|
Re: Re (tilly) 1: associative array problem
by Gerryjun (Scribe) on Nov 02, 2001 at 20:36 UTC | |
by tilly (Archbishop) on Nov 02, 2001 at 20:52 UTC |