Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Subs (Placement when Prototyping)

by Jazz (Curate)
on Mar 25, 2002 at 18:55 UTC ( [id://154177]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub prototest($); # declare sub and prototype 
    
    prototest( 4 ); # dies if no param or more than 1 param is passed
    ...
    sub prototest($){
        print '1, 2, 3, ', @_;
    }
    
  2. or download this
    sub prototest($){
        print '1, 2, 3, ', @_;
    }
    prototest( 4 ); # dies if no param or more than 1 param is passed
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found