in reply to array ref problem

Also, you don't call a sub with '&', just name it. That's old-school Perl4, now deprecated. In fact the only time you would now (afaik) is if you want a a ref-to-sub.

Replies are listed 'Best First'.
Re^2: array ref problem
by rovf (Priest) on Nov 03, 2008 at 10:13 UTC
    In fact the only time you would now (afaik) is if you want a a ref-to-sub.

    or when forwarding to another sub:

    sub _foo_impl { ... } sub foo { .... &_foo_impl; ... } foo(1,2,3); # _foo_impl(1,2,3) gets called

    -- 
    Ronald Fischer <ynnor@mm.st>
      In fact the only time you would now (afaik) is if you want a a ref-to-sub.
      or when forwarding to another sub:

      ...or when you want to bypass the prototype of the sub you're calling.