Dear Alistair,

I mean literal system restart. That is, whenever I am executing the external
commands as described in my original mail(I am sorry for the TYPO error but
I didn't make that mistake in the script) the system is literally getting
restarted/rebooted. I need to login again and start my work.

I executed the some of those commands on my colleagues system(Win98,
ActivePerl-version 620) and they executed fine. One thing I observed here
was surprising. I observed that without the presence of COMMAND.COM in the
working directory I was not able to execute those commands therealso. But,
the system didn't restart/reboot it either hanged or displayed "Incorrect
DOS version" message. Hence, I copied the COMMAND.COM to my working
directory as workaround per now.

Kindly let me know if my understandings/observations are wrong.

Rajesh.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 6:05 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: URGENT: problem executing external commands in my
perlscript


Rajesh,

What exactly do you mean by system restart?  Does perl -V run or a one liner
printing hello world?

Your code has a syntax error.
        open(DIR,"dir |) || die "$PROG: couldn't execute dir command: $!|n";
should read
        open(DIR,"dir |") || die "$PROG: couldn't execute dir command $!"
if you put a "\n" (not a "|n") you will surpress the "at line n" text which
is very useful when you are debugging

As for "Incorrect DOS version". Something's very odd there. Are you running
command.com rather than cmd on NT or something?

Alistair

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

Reply via email to