in reply to Re^3: Problem with internet explorer.Mozilla firefox,beonex,netscape ok.
in thread Problem with internet explorer.Mozilla firefox,beonex,netscape ok.

Just to help the newbies, when you call a function just with &foo the values in @_ are used as arguments to the function. This leads to some weird results.

So, when you just want to call a function, use foo().

Alberto Simões

  • Comment on Re^4: Problem with internet explorer.Mozilla firefox,beonex,netscape ok.

Replies are listed 'Best First'.
Re^5: Problem with internet explorer.Mozilla firefox,beonex,netscape ok.
by Fletch (Bishop) on Mar 27, 2005 at 22:49 UTC

    Erm, yes and no. &foo; (with no parens) passes the caller's @_, whereas &foo(); (with empty parens) passes an empty argument list. The former also has the side-effect of ignoring any prototypes. See perldoc perlsub for more details.

Re^5: Problem with internet explorer.Mozilla firefox,beonex,netscape ok.
by Pescador (Novice) on Mar 27, 2005 at 18:26 UTC
    Thanks for helping this newbie :)