in reply to Re: calling f(arg1,arg2,arg3) better than &f
in thread calling f(arg1,arg2,arg3) better than &f

Thanks. But why we want to share @_ with the caller? Please enlighten me. I am a true newbie in perl. Thanks
  • Comment on Re^2: calling f(arg1,arg2,arg3) better than &f

Replies are listed 'Best First'.
Re^3: calling f(arg1,arg2,arg3) better than &f
by ikegami (Patriarch) on Feb 08, 2006 at 17:54 UTC
    Sometimes, you want to pass the arguments you received on to the called function. It's more efficient than creating a new @_. Even more efficient is goto(&f) which returns directly to the caller. Both of these tricks are useful when dealing with advanced features and techniques such as AUTOLOAD and currying. This is not something one commonly does, so & is rarely required.