Different methods to call a subroutine!

P

pod69

Hello,

Is there any difference if i call a subroutine wit subroutine() or
&subroutine() - whats the different with the "&"!
Can anyone tell me that?

thx
 
K

kens

Hello,

Is there any difference if i call a subroutine wit subroutine() or
&subroutine() - whats the different with the "&"!
Can anyone tell me that?

thx

Take a look at the documentation:

perldoc perlsub

Ken
 
D

Dr.Ruud

(e-mail address removed) schreef:
Is there any difference if i call a subroutine wit subroutine() or
&subroutine() - whats the different with the "&"!
Can anyone tell me that?

See perlsub.
 
P

Paul Lalli

Is there any difference if i call a subroutine wit subroutine() or
&subroutine() - whats the different with the "&"!
Can anyone tell me that?

Everyone so far has instructed you to read `perldoc perlsub`. That's
good advice. To help you narrow it down, the shortest answer is:

& disables prototype-checking and passes the current @_.

Search for "prototype" and "@_" within perlsub for more details.

Paul Lalli
 
T

Tad McClellan

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top