I actually noticed the typo sometime after posting to this board, and replaced it with:
new("Application", '\\\\MDS-APL')
Unfortunately that did not work either!
Also, does anyone know if this module only allows me to write to the application log? I have tried (Locally) writing to the Security or System log to no avail!


TYIA




From: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: Win32::EventLog
Date: Tue, 25 Mar 2003 13:15:51 +0000


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 naremed \\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


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to