Wiggins has asked for the wisdom of the Perl Monks concerning the following question:
Now the mainline calling code:package test_a; # optionaly; to be set/over-ridden from user code.... $AuxDataFile= "AuxData"; $TmpltFile= "LinuxScript-Text.txt"; $DataCSV = "LinuxScript-TEST-Data.csv"; $AttachmentFile; *LogFile; #################### Subs ########################### sub SetLog ( $ ){ *LogFile = @_; #Adv Perl Programming (Rel 1) pg 49 } sub TestLog { printf LogFile "a::TestLog print\n"; } 1;
The printf line from the test_a package never gets into the log file????use test_a; open LOGF, ">log.txt"; $|=1; #*test_a::LogFile =*LOGF ; test_a::SetLog (*LOGF) ; printf LOGF "Run started\n"; test_a::TestLog(); printf LOGF "Run ended\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sharing filehandles
by holli (Abbot) on Jun 29, 2008 at 16:13 UTC | |
|
Re: sharing filehandles
by pc88mxer (Vicar) on Jun 29, 2008 at 16:21 UTC | |
by Wiggins (Hermit) on Jun 29, 2008 at 23:52 UTC | |
|
Re: sharing filehandles
by apl (Monsignor) on Jun 29, 2008 at 18:46 UTC | |
|
Re: sharing filehandles
by zentara (Cardinal) on Jun 30, 2008 at 14:45 UTC |