Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Minimize Hash Key Value Combinations

by RichardK (Priest)
on Nov 18, 2013 at 14:03 UTC ( #1063093=note: print w/ replies, xml ) Need Help??


in reply to Minimize Hash Key Value Combinations

you could store your attributes in there own hash (or even an array), and then the relations can refer to the shorter keys

my %attrib = (key1 => 'xxxx', key2 => 'yyyy', ...); [a,b,c] => [key1,key2]; [d] => [keyn]; #etc

the keys can then be as short as you like, a simple count or even a hash of the data.


Comment on Re: Minimize Hash Key Value Combinations
Download Code
Re^2: Minimize Hash Key Value Combinations
by AlexTape (Monk) on Nov 18, 2013 at 14:21 UTC
    thats basically call by reference :) but thank you..
    $perlig =~ s/pec/cep/g if 'errors expected';

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-12-21 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (100 votes), past polls