Walt Mankowski on 24 Nov 2004 21:53:42 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Fun error message


I didn't think the code I just wrote was going to work the first time,
but I have to admit I was a bit surprised by this particular error
message:

  Pseudo-hashes are deprecated at superjack.pl line 522, <IN> line 4.

I didn't *think* I was using pseudo-hashes...

Aha!  After looking at it some more, the problem is that I'm compiling
data for a report in a hash by doing

  push @{$h{$key1}{$key2}}, $val;

It's possible that only a subset of the possible key2's are used, but
my user asked for them all to appear in the report.  I attempted to do
this by initializing the hash like this:

  $h{$_} = [] for @all_possible_key2s;

Oops!

Walt, who's really looking forward to this 4-day weekend...

Attachment: signature.asc
Description: Digital signature