Re: PERL code execution rule?

2003-09-10 Thread R. Joseph Newton
Rodney Wise wrote: George, # Get the Data Number get_number; Avoid using the function_name until you are a Perl expert, and know exactly why you are using it. That is a call to the subroutine, but not the one to be used under normal circumstances. # Get Form Information parse_form; To

Re: PERL code execution rule?

2003-09-10 Thread R. Joseph Newton
George Schlossnagle wrote: On Tuesday, September 9, 2003, at 10:59 AM, Rodney Wise wrote: It looks like by declaring my subroutines, they are being executed. ??? example of my Subroutine declarations: # Get the Data Number get_number; # Get Form Information parse_form;

Re: PERL code execution rule?

2003-09-10 Thread R. Joseph Newton
James Edward Gray II wrote: Almost. You have to declare them before you use them if you want to leave of the parenthesis. :) James Actually, it is vice-versa. If you use prototypes, then the prototype must be declared before any call to the function. In that case, you will have a

RE: PERL code execution rule?

2003-09-10 Thread Bob Showalter
R. Joseph Newton wrote: James Edward Gray II wrote: Almost. You have to declare them before you use them if you want to leave of the parenthesis. :) James Actually, it is vice-versa. Actually, James is correct. Quoting from perldoc perlsyn: Declaring a subroutine allows a

Re: PERL code execution rule?

2003-09-10 Thread david
John W. Krahn wrote: [snip] example of my Subroutine declarations: # Get the Data Number get_number; # Get Form Information parse_form; [snip] You are running the subroutines. These are all equivalent (note that the third example only works if the sub has been declared

PERL code execution rule?

2003-09-09 Thread Rodney Wise
I was under the impression that subroutines are only executed IF they're called. But, it looks like subroutines will execute on there own if they are written in the beginning part of the PERL code and before other code takes over the codes sequence of events. In other words, if there is a

Re: PERL code execution rule?

2003-09-09 Thread George Schlossnagle
On Tuesday, September 9, 2003, at 09:50 AM, Rodney Wise wrote: I was under the impression that subroutines are only executed IF they're called. But, it looks like subroutines will execute on there own if they are written in the beginning part of the PERL code and before other code takes over

Re: PERL code execution rule?

2003-09-09 Thread Rodney Wise
George, Thanks for the quick response. I was reviewing my code some more and here is what I think might be happening. In my code, the first thing I do is declare my variables. Then I declare my subroutines'. It looks like by declaring my subroutines, they are being executed. ??? example of

RE: PERL code execution rule?

2003-09-09 Thread Paul Kraus
to declare them. HTH Paul -Original Message- From: Rodney Wise [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 10:59 AM To: [EMAIL PROTECTED] Subject: Re: PERL code execution rule? George, Thanks for the quick response. I was reviewing my code some more and here is what I think

Re: PERL code execution rule?

2003-09-09 Thread George Schlossnagle
On Tuesday, September 9, 2003, at 10:59 AM, Rodney Wise wrote: It looks like by declaring my subroutines, they are being executed. ??? example of my Subroutine declarations: # Get the Data Number get_number; # Get Form Information parse_form; Just to be sure we're on the same playing field -

RE: PERL code execution rule?

2003-09-09 Thread Dan Muey
George, Thanks for the quick response. I was reviewing my code some more and here is what I think might be happening. In my code, the first thing I do is declare my variables. Then I declare my subroutines'. It looks like by declaring my subroutines, they are being executed.

Re: PERL code execution rule?

2003-09-09 Thread John W. Krahn
Rodney Wise wrote: I was reviewing my code some more and here is what I think might be happening. In my code, the first thing I do is declare my variables. Then I declare my subroutines'. It looks like by declaring my subroutines, they are being executed. ??? example of my

RE: PERL code execution rule?

2003-09-09 Thread Paul Kraus
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 1:53 PM To: [EMAIL PROTECTED] Subject: Re: PERL code execution rule? Rodney Wise wrote: I was reviewing my code some more and here is what I think might be happening. In my code

Re: PERL code execution rule?

2003-09-09 Thread James Edward Gray II
On Tuesday, September 9, 2003, at 12:57 PM, Paul Kraus wrote: That's interesting. I have also read that you need to have the subs at the top of the script if you call it with sub() Almost. You have to declare them before you use them if you want to leave of the parenthesis. :) James -- To

Re: PERL code execution rule?

2003-09-09 Thread John W. Krahn
Paul Kraus wrote: That's interesting. I have also read that you need to have the subs at the top of the script if you call it with sub() However I just realized that I always have my subs at the bottom and always call them with sub() without the ampersand. Am I getting lucky? Should I

Re: PERL code execution rule?

2003-09-09 Thread Rodney Wise
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. Apparently, Matt used a lot of global variables in his

RE: PERL code execution rule?

2003-09-09 Thread Paul Kraus
To: [EMAIL PROTECTED] Subject: Re: PERL code execution rule? 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. Apparently

RE: PERL code execution rule?

2003-09-09 Thread Tim Johnson
:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 9:29 AM To: [EMAIL PROTECTED] Subject: Re: PERL code execution rule? 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

Re: PERL code execution rule?

2003-09-09 Thread Wiggins d'Anconia
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

Re: PERL code execution rule?

2003-09-09 Thread R. Joseph Newton
Rodney Wise wrote: I was under the impression that subroutines are only executed IF they're called. But, it looks like subroutines will execute on there own if they are written in the beginning part of the PERL code and before other code takes over the codes sequence of events. In other