in reply to adding number to array name

Like so:
my $last_one = pop(@{'store_get_dist'.$i});

update But... I'd not do it that way. I'd make an array of anonymous arrays and say rather

my $last_one = pop(@{$store_get_dist[$i]});

than using symbolic references...

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: adding number to array name
by friedo (Prior) on Aug 23, 2006 at 21:50 UTC
      Of course. First I answered the OPs question, thenI was completing the node with my objection to the approach. You caught me whilst editing ;-)

      Maybe the other way round it's better - objection first?

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}