in reply to Re: symbolic ref error
in thread symbolic ref error

I know it looks messy but what I am trying to do is put a value into an array that is named after the conditions in which the value was taken. Here is more:
$seq = 'KLLS3'; $point = 'weight'; $index = 4; $mean = 1.443; sorting($seq, $index, $point, $mean); sub sorting { if ($_[0] eq "KLLS3_LT.V4_0") { if ($_[1] == "1") {push @{{$_[2]}{$_[0]}{$_[1]}}, $_[3];} }

Replies are listed 'Best First'.
Re^3: symbolic ref error
by runrig (Abbot) on Aug 10, 2005 at 17:25 UTC
    ...put a value into an array that is named after the conditions...

    Is there any reason why you can't use a hash array instead of a symbolic reference to a regular array (and use strict)? E.g.:

    my $seq = 'KLLS3'; my $point = 'weight'; my $index = 4; my $mean = 1.443; my %hash; sorting($seq, $index, $point, $mean); sub sorting { if ($_[0] eq "KLLS3_LT.V4_0") { if ($_[1] == "1") {push @{$hash{$_[2]}{$_[0]}{$_[1]}}, $_[3];} } }
      I'm not familiar with using a "hash array". Where can I learn more? I have all the O'Reilly books on Perl. In your example, how would you retreive the values from the numerous arrays?
        Start with perldoc perldata, perldsc, and perllol. And look up "hash" in the index and table of contents in your books. Are you familiar with "associative array"? It's the same sort of thing.