Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by ambs (Pilgrim)
on Mar 27, 2005 at 18:08 UTC ( #442663=note: print w/replies, xml ) Need Help??


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 (Chancellor) 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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://442663]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2021-10-27 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (93 votes). Check out past polls.

    Notices?