On 9/24/2001 4:08 PM, "FamilyConnect" <[EMAIL PROTECTED]>
wrote:
> Problem...I am defining my subroutines at the beginning of my program, and
> Perl
> is executing the subroutine at compile time before it is actually called.....I
> don't think this is proper behaviour...e.g.
>
You mean when you do a perl -c script_name ??? Or when you do a perl -w
script_name ???
Your script is generally fine, I believe you misunderstand what you did -
open (LOG, ">/tmp/log");
Not checking return values &&
Total overwite of /tmp/log ...
sub nearlyfatallywounded ($) {
my $ERRMSG=$_[0];
print LOG "The Error is: $ERRMSG\n";
warn "$ERRMSG\n";
}
Declaration of a valid SUB which is called below ...
nearlyfatallywounded("Legitimate Error");
So, you generate a manual error when there is none...
close;
So, it appears to be proper behavior;
Just my $cents - 2;
-Sx-
William C (Bill) Jones
Lead, Courseware Support Analyst
(Lead e-Systems Developer)
Florida Community College at Jacksonville
501 West State Street, Rm 229
Jacksonville, Florida 32202-4030
[EMAIL PROTECTED]
PHONE (904) 632-3089
FAX (904) 632-3007
__________________________________________________________________
"I know you believe you understand what you think I said, but I am
not sure you realize that what you heard is not what I meant."
::: Richard Nixon
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users