On 24/03/2003 22:24:37 perl-win32-users-admin wrote: >Hello all, > >I am having a terrible time trying to get the following script to write to a >remote EVENT LOG. What am I doing wrong? or am I going outside of the >boundaries the module is capable of? Whether local or remote it always writes >to my local Event Log?? Any info would be greatly appreciated. > ><code> > >use Win32::EventLog; >$| = 1; > >my $msg = "TEST"; >my $src = "MYPC"; >my $handle = Win32::EventLog->new("Application, $ENV{'\\\\MDS-APL'}") >or die "Cant open LOG\n"; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You are passing a single parameter to Win32::EventLog::new ! (everything in the quotes gets interpolated into a single value).
If that's a typo and you really meant new("Application", $ENV{'\\\\MDS-APL'}) then are you sure you meant the contents of the environment variable named \\MDS-APL and not the computer named \\MDS-APL ? I think you need to lose the $ENV{} around '\\\\MDS-APL'. -- Csaba Ráduly, Software Engineer, Sophos Anti-Virus Email: [EMAIL PROTECTED], Tel: 01235 559933, Web: www.sophos.com Add live virus info to your website: http://www.sophos.com/link/vfeed _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs