Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: many files one log file

by glenn (Scribe)
on Dec 04, 2013 at 14:03 UTC ( [id://1065592]=note: print w/replies, xml ) Need Help??


in reply to Re: many files one log file
in thread many files one log file

Thank you. So it broke using the variables in main stating that it must be called main::$LOGFH.

As for using require do you think this would work?
Orignal:
use diagConfig; #$sourcepath, %files, trimwhitespace, cleanupWincuri, +$WINCURI, $PLINK, $CLI open my $LOGFH ,">", $files{log}{file}; #disable write buffer my $stdout = select($LOGFH); $| = 1; select($stdout); use VolumeManager (\$LOGFH, \$writelog); use Initiator (\$LOGFH, \$writelog); my $vm = VolumeManager->new(); my $init = Initiator->new();

Require:
use diagConfig; #$sourcepath, %files, trimwhitespace, cleanupWincuri, +$WINCURI, $PLINK, $CLI open my $LOGFH ,">", $files{log}{file}; #disable write buffer my $stdout = select($LOGFH); $| = 1; select($stdout); require VolumeManager; VolumeManager->import(\$LOGFH, \$writelog); my $vm = VolumeManager->new(); require Initiator; Initiator->import(\$LOGFH, \$writelog); my $init = Initiator->new();

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1065592]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-19 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found