Re: Different methods to call a subroutine!



pod69@xxxxxxx <pod69@xxxxxxx> wrote:


Is there any difference if i call a subroutine wit subroutine() or
&subroutine() -


Yes.


whats the different with the "&"!


You are expected to check the Perl FAQ *before* posting to
the Perl newsgroup.

perldoc -q "&"

Whatâ??s the difference between calling a function as &foo and foo()?


(which also answers the difference between &foo() and foo() )


Can anyone tell me that?


Anyone with the courtesy to check the FAQ could.


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.



Relevant Pages

  • Re: How can script find its hosts name/IP address?
    ... just foo). ... The Perl FAQ does ... include a question on how to get the "hostname/domainname/IP ... information to obtain the host's domainname. ...
    (comp.lang.perl.misc)
  • Re: Circular Class Logic
    ... Is it just explicitly calling the super's ... What is going on is that Disk is being initialized with a single ... information than just the drive letter. ... initialize a class level variable on class Foo, ...
    (comp.lang.python)
  • Re: Retrieving the name of the class calling an instance method
    ... for the someMethod method to print the name of the class calling it ("bar" ... Note that "self" for somemethod is just a local variable of the calling ... the simplest is to pass the instance of bar or again to the foo constructor ...
    (comp.lang.python)
  • Re: Replacing a package with another
    ... have package a.blah which I want instead of b.blah, ... print "original foo" ... print "calling a.tax:" ... patching a.foo ...
    (comp.lang.python)
  • Re: Retrieving the name of the class calling an instance method
    ... mercado mercado wrote: ... will show foo in both cases, which is in fact the name of the class which is calling it. ...
    (comp.lang.python)