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

Re: where do you put your subs

by BeernuT (Pilgrim)
on Mar 08, 2002 at 06:27 UTC ( [id://150241]=note: print w/replies, xml ) Need Help??


in reply to where do you put your subs

I prefer this type of setup:
#!/usr/bin/perl use (pragmas); use Modules; my $var; declare any global variables here main code goes here Then my subs are at the bottem. usually in order of importance
It's just the style that I adapted to. I have no paticular reason to use it other than its what keeps me sane :) I have tried to put subs at the top, in the middle, spread around, but I like having all my code in the order above. Makes it easier for me to work with.

-bn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-25 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found