Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: symbolic ref error

by runrig (Abbot)
on Aug 10, 2005 at 17:25 UTC ( [id://482663]=note: print w/replies, xml ) Need Help??


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

...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];} } }

Replies are listed 'Best First'.
Re^4: symbolic ref error
by Lhamo_rin (Friar) on Aug 10, 2005 at 18:26 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://482663]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found