Can I dynamically declare an array by doing something like:
for (keys %codes_hash) { my @$_; {
so that I have an array for each code in my hash that I can push data to whatever array is associated with the code that I searching on at that iteration?
What you are referring to here is known as 'Symbolic References'. This is not a recommended practice, read through this link
http://perl.plover.com/varvarname.html
Do these hash keys already have a value, if not you can assign an array reference to each key
For e.g.
use Data::Dumper;
my %codes_hash = (
abc => undef,
def => undef,
);
foreach (keys (%codes_hash)) { push (@{$codes_hash{$_}}, 1, 2, 3); } print Dumper(\%codes_hash);
Do read through the following docs to perldoc perlreftut perldoc perlref perldoc perllol
You can view the data structure that you have created using the Data::Dumper module
perldoc Data::Dumper
Tim
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]