Usage of sub-routine prototype

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Dear friends ,

Can any one tell me what is the usage of sub-routine prototype , I
know that was optional one but I wanted to know that whether it has
any usages.

ThanX in advance

Re: Usage of sub-routine prototype

Quoted text here. Click to load it

Errr, there is a section named "Prototypes" in

    perldoc perlsub

Did that leave you with more questions?

If so, then ask _those_ questions.

When you have a question about subroutines, you should try reading
the docs for subroutines. Did you do that already?

Quoted text here. Click to load it

It "supports a very limited kind of compile-time argument checking".

So limited that you almost surely should not use prototypes in Perl.

And a beginner should certainly not be using them.

See also:

Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher0cmdat/"

Site Timeline