SPUG:object in a hash

mkorb mkorb at systemsbiology.org
Wed Jun 4 11:03:03 CDT 2003


Here is a script slice

 

 

1          $INFOHASH{$infoRecord = new
RecordObject(\@columnArray,\@infoArray)}++;;

2                                  print "$infoRecord\n";

3          print "$infoRecord->{comName1}\n";

4          

5

6          foreach my $key (keys %INFOHASH)

7          {

8                                  print "$key\n";

9                                  print "$INFOHASH{$key}\n";

10                                 print "$key->{comName1}\n";

11         }

 

Line 2 prints the same as line 8 

Line 3 prints the correct value, so does line 9 

Line 10 gives me the following error "can not use String RecordObject=
Hash... as Hashref while strict refs in use. 

 

Isn't line 10 the same as Line 3, see Line 2 and 8

 

What am I overlooking? 

 

Thanks 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/spug-list/attachments/20030604/61260ef0/attachment.htm


More information about the spug-list mailing list