in reply to symbolic ref error

You shouldn't be using symbolic refs in the first place!

Maybe you should back up a step. Can you describe your goal without going into implementation?

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: symbolic ref error
by Lhamo_rin (Friar) on Aug 10, 2005 at 17:11 UTC
    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];} }
      ...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?