"be consistent" | |
PerlMonks |
how to split hash into two arraysby baxy77bax (Deacon) |
on Jul 07, 2009 at 07:49 UTC ( [id://777777]=perlquestion: print w/replies, xml ) | Need Help?? |
baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:
hi, i need a quick oneliner for this script if one exists: so basically i have a hash that needs to be broken into two arrays and depending on a hash key the position of the key and value needs to be placed on a specific position in two corresponding arrays thank you Update: ok i have a sub() that takes some variables. and the way to pass some variables to that sub is through hash interface.like this: sometimes user can pass only one variable to the _sub(). for example in this case only the $array->[2] will be defined and all others will be undef. so what i need is one extra array that will tell me the key (key3) that corresponds to that variable and that key should be placed on a $secarray->[2] position
Back to
Seekers of Perl Wisdom
|
|