apr_1985 has asked for the wisdom of the Perl Monks concerning the following question:

Hello. I have a Windows 2003 64bit server.
Everytime that I try a system command if fails. Even simple things like
system ("dir"); dont work.

It doesnt come up with an error message or anything it just seems to ignore the command.

I have tried both 64 and 32bit versions of 5.8.6.811.
It works fine on my 32bit XP machines

Can anyone suggest anything it maybe??

Thanks
Apr_1985

Replies are listed 'Best First'.
Re: Using system command on Win2003 X64
by syphilis (Archbishop) on Nov 19, 2007 at 13:57 UTC
    Do you run your scripts as script.pl or as perl script.pl ?
    Does it make any difference if you run system("dir <nul"); ?
    Does perl -V produce normal output ?

    You probably should give us a copy'n'paste of an actual script that demonstrates the problem ... along with a copy'n'paste of the output. (I think it's highly likely that you know what you're doing ... but the only way *we* can actually *know* that you're not doing something silly is if you give us a copy'n'paste of input and output.)

    Cheers,
    Rob
Re: Using system command on Win2003 X64
by cdarke (Prior) on Nov 19, 2007 at 13:11 UTC
    Check the return value from system, or $? >> 8. This should give an error code. If zero, then it is not telling. In that case I suggest you try running system('cmd.exe') to see if you get a cmd.exe console.