Re: Sub routine location
- From: xhoster@xxxxxxxxx
- Date: 03 Jan 2006 21:02:26 GMT
"sunckell" <sunckell@xxxxxxxxx> wrote:
> hello everyone,
>
> I have been working with perl a lot lately. Trying to read up as
> much as I can. I am getting a little confused on how the script
> "should look". I have downloaded and reviewed code from other
> programmers, read several books, and I am seeing some discrepecies on
> the location of sub routines.
>
> My question: where should sub routines be located in a script?
I tend to put the subroutines that are the intellectual guts of the program
at the top (above the non-subroutine code) and the utility and scut-work
subroutines at the bottom.
> Should they be at the top of the script, before MAIN, or at the end of
> the script, after MAIN?
There is no Arizona. Wait, I mean there is no MAIN.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.
- Prev by Date: PPM installation error - Couldn't open file c:\temp/modulename/ for writing
- Next by Date: Re: Shebang not working
- Previous by thread: PPM installation error - Couldn't open file c:\temp/modulename/ for writing
- Next by thread: FAQ 4.69 How can I use a reference as a hash key?
- Index(es):
Relevant Pages
|