------------------------------------------------
On Tue, 9 Sep 2003 12:28:42 -0400, "Rodney Wise" <[EMAIL PROTECTED]> wrote:

> Thanks everyone for your help.
> 
> I'm working on a PERL script for the "WWWboard" originally written by Matt
> Wright.  PERL isn't my primary language (as I'm sure you all can see) ...
> although I'm finding it very powerful and useful.
> 

There are much improved replacements for essentially the same thing available for 
free.  Check out:

http://sourceforge.net/projects/nms-cgi/

> Apparently, Matt used a lot of global variables in his subroutines... I
> thought that might be a dangerous practice and it also makes the subroutines
> not very portable.  But, I also believe I read somewhere that the
> subroutines need to be declared.... I must have been mistaken.... 'cause I
> can't find that reference info now... AND you guys are absolutely correct...
> my "supposed" declarations are actually instructing the subroutines to
> execute.
> 
> I will correct this immediately.
> 
> As a side note.... Where is the best place to put the subroutines?  After
> the exit command or in the beginning of the script?  Any preferences?
> 
> 

I prefer to put them in neither place, stash them in a library and then upgrade it 
with a package statement and you are half way to a module.  Assuming there isn't 
already a better one on CPAN.

perldoc perlstyle

for some thoughts on this and similar, but to each their own.... If they must go in 
the same script I put them after the "main".  The 'exit' as you mention really has 
very little bearing on the matter, as I usually also don't provide one unless it is 
needed (aka serves some specific purpose).

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to