in reply to sub routines inside subroutines

Hi there cleen! I won't say I am an expert or anything, cause I'm not, but from past experience and work I have done with subroutines within the Perl programming language, I have found that it doesn't slow a script down too much if you have a subroutine within a subroutine, but there are, however, some dangers using subroutines that I am aware of, however not fully aware of all of the possible problems.

If i'm correct, if you use subroutines a lot, it can be fairly unsecure or at least not as secure if you just passed parameters to each other instead of using subroutines, but I am probably wrong on this point. There are many other people that can add to this telling you about the pros and cons of both... hopefully this helps :o) talk to ya later.

bladx ~ ¡muchas veces tengo preguntas!

Replies are listed 'Best First'.
Re: Re: sub routines inside subroutines
by strredwolf (Chaplain) on Feb 27, 2001 at 12:17 UTC
    It more like you will loose track of what you can and can't call if you start nesting subroutines. And when that happens, you might introduce a security hole or two.

    --
    $Stalag99{"URL"}="http://stalag99.keenspace.com";

      Which brings me to another question, is there any reason to use nested subroutines? IE a practicle use for them other then they are nested, since they dont share variables from the upper routine in which its nested from?