Re: trying to use IO::Handle
- From: chas.owens@xxxxxxxxx (Chas. Owens)
- Date: Sun, 13 Apr 2008 22:45:32 -0400
On Sun, Apr 13, 2008 at 9:21 PM, Richard Lee <rich.japh@xxxxxxxxx> wrote:
snip
does subroutine introduce additional delay?snip
Yes, there is a non-trivial amount of work done setting up a function
call; however, since you are only calling it once that isn't a big
deal. My rule of thumb for creating functions is: I need a function
if I use this code repeatedly or the code is complex and ruins the
flow of the main script. In general, the later is rare.
snip
I am trying to write a lot of perl and trying to organize my program insnip
case I need to modulalize it. Well, I just like
having pretty much all function in sub.
Also trying to learn subroutine..
If a piece of code doesn't get used repeatedly, it doesn't deserve
modularization. Also, you said in an earlier post that you were using
a global variable (@bad I think), using global variables defeats
modularization and is bad programming practice to boot.
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
.
- References:
- questions from Learning Perl
- From: itshardtogetone
- trying to use IO::Handle
- From: Richard Lee
- Re: trying to use IO::Handle
- From: Rob Dixon
- Re: trying to use IO::Handle
- From: Richard Lee
- Re: trying to use IO::Handle
- From: John W. Krahn
- Re: trying to use IO::Handle
- From: Richard Lee
- Re: trying to use IO::Handle
- From: John W. Krahn
- Re: trying to use IO::Handle
- From: Richard Lee
- Re: trying to use IO::Handle
- From: John W. Krahn
- Re: trying to use IO::Handle
- From: Richard Lee
- questions from Learning Perl
- Prev by Date: Re: trying to use IO::Handle
- Next by Date: Re: trying to use IO::Handle
- Previous by thread: Re: trying to use IO::Handle
- Next by thread: Re: trying to use IO::Handle
- Index(es):
Relevant Pages
|
|