in reply to subroutine references

Why the variable?
$comms{'one'}->('item');
And if you're using 5.006, you can even drop out that arrow!

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
subroutine references
by agoth (Chaplain) on Jul 14, 2000 at 18:53 UTC
    fantastic :-), I'd tried:
    $comms{'one'}();
    to no avail!, hadnt thought of the -> option
      you could also do:
      &{$comms{one}}('item');