Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: End of subroutine

by mpeever (Friar)
on Nov 07, 2008 at 05:15 UTC ( [id://722155]=note: print w/replies, xml ) Need Help??


in reply to End of subroutine

The 1 isn't at the end of the subroutine: the subroutine ends with the '}'. The '1' typically marks the end of a module, as modules need to "return" a true value. From the Simple Module Tutorial:

We need the 1; at the end because when a module loads Perl checks to see that the module returns a true value to ensure it loaded OK. You could put any true value at the end (see Code::Police) but 1 is the convention.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-24 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found