lpoht has asked for the wisdom of the Perl Monks concerning the following question:
When I run the program, I get the error 'Can't use string ("anaglyph") as a HASH ref while "strict refs" in use'. Any help will be greatly appreciated.my $x=0; my $numpix = @data; while ($data[$x]){ my ($i,@orderdata,%myhash); foreach $i (1 .. $x){ if ($i == $data[$x]{'picorder'}){$myhash{'orderline'} = "< +option value=\"$i\" selected>$i</option>"; }else{$myhash{'orderline'} = "<option value=\"$i\" sel +ected>$i</option>";} push (@orderdata, \%myhash); } $data[$x]{'orderdata'} = \@orderdata; if ($data[$x]{'anaglyph'} eq "Yes"){$data[$x]{'anaglyph'}="che +cked";} $x++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dereferencing hash within a hash within an array
by sauoq (Abbot) on Jan 10, 2003 at 23:12 UTC | |
|
Re: dereferencing hash within a hash within an array
by lpoht (Sexton) on Jan 11, 2003 at 01:58 UTC | |
by Hofmator (Curate) on Jan 11, 2003 at 13:14 UTC | |
|
Re: dereferencing hash within a hash within an array
by BrowserUk (Patriarch) on Jan 10, 2003 at 23:07 UTC | |
by sauoq (Abbot) on Jan 10, 2003 at 23:20 UTC | |
|
Re: dereferencing hash within a hash within an array
by Mr. Muskrat (Canon) on Jan 10, 2003 at 23:07 UTC | |
by ihb (Deacon) on Jan 10, 2003 at 23:24 UTC | |
by lpoht (Sexton) on Jan 11, 2003 at 01:41 UTC |