in reply to looping through array references
Note that:
for (my $item = 0; $item <= $#{$ref}; $item++) {
is much better written:
for my $item (0 .. $#{$ref}) {
and you should always declare for loop variables in the loop header:
foreach my $hashref (@{$ref}) {
to avoid any reader's confusion about the scope of the variable.
|
|---|