Hello all,

            I'm a bit confounded by the error I'm getting.

I've got a small subroutine (listed below) that I call when I need to
post data to both the console and a logfile.

It is using two globals and one variable passed to it (globals are a
flag to enable/disable the logfile, and the filehandle).

It's a dead simple subroutine and I don't know what I'm doing wrong.

Basically the script interfaces to some National Instruments hardware
(which is working fine) and iterates over several options (also working
fine).  As it goes it logs results, data, etc.

Periodically and *not* at the same point in the program each time the
script will fail with an "undefined subroutine &main::sLogData", this
after it's successfully called it 20 or 30 times before...

 

Any thoughts?

Cheers,

-Marc

 

 

sub sLogData(@)

{

            my $string=$_[0];

            print "$string";

            if ($flag_log) {print LOGFILE "$string"; }

            return(0);

}

 

 

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to