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
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;
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
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
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
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
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
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
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
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 -
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.
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
-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
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
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
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
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
:[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
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
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
20 matches
Mail list logo