in reply to WScript

The $WScript variable is only defined when your code is executed inside the Windows Scripting Host. You can run your script inside WSH by using the .pls extension for your script and running it as wscript test5.pls.

Note that WSH support for Perl requires the PerlScript ActiveX scripting engine interface from ActivePerl and is not available with other Perl distributions.

Replies are listed 'Best First'.
Re^2: WScript Win32
by mironduplessis (Initiate) on Dec 22, 2008 at 15:52 UTC
    Hi,

    Thanks for your responses before. I have tried to gather some more information so that I can change the question into something more intelligent:-)

    Basically if i run the following two tests from the command line:

    *********TEST1**********

    cscript //E:PerlScript c:\"Perl Code"\test1.pl

    #code from test1.pl

    print "Hello";

    WScript->Quit(2)

    I will receive the following output.

    Hello

    (check error code)

    c:\ echo %ERRORLEVEL%

    2 (Response)

    *********TEST2**********

    cscript //E:PerlScript c:\"Perl Code"\test2.pl

    code from test2.pl is shown in original post

    I will receive the following output:

    Message: Success

    Statistic: 0

    Server Teminated Script.

    (check error code)

    c:\ echo %ERRORLEVEL%

    -1073741785 (response)

    *******************************

    So then my question is what causes the script to terminate with that error code. From what I can see if i remove the statements which refer to the sub modules within radius.pm the script does not return that error code. Im sure i am doing something obviously wrong. Does anyone know what I should be doing.

    Kind Regards

    Miron