DavidCherryWelch has asked for the wisdom of the Perl Monks concerning the following question:
I have a couple of PERL scripts that I use to do tasks at work. After a recent install of an unrelated package, PERL no longer works. Fortunately for me, I have another box that is still working so I have a workaround but I would like to get my XP box fixed.
I wrote a simple script to demostrate the problem. Here it is:
print("Hello\n"); $ret=`echo dog`; print ("step 1 \$ret is $ret\n"); $SAScmd='c:\\apps\\sas\\sas9~1.1\\sas.exe' print("step 2 \$SAScmd is $SAScmd\n"); # run a SAS job # surprisingly this works $ret=`$SAScmd c:\\perl_test\\test.sas -batch`; print("step 3 \$ret is $ret\n"); # copy a file $ret=`copy c:\\perl_test\\test.sas c:\\perl_test\\test_new.sas`; print("step 4 \$ret is $ret/n");
Here is the output from the box that works:
Hello step 1 $ret is dog step 2 $SAScmd is c:\apps\sas\sas9~1.1\sas.exe step 3 $ret is step 4 $ret is 1 file(s) copied.
Here is the output from the XP box:
Hello step 1 $ret is step 2 $SAScmd is c:\apps\sas\sas9~1.1\sas.exe step 3 $ret is step 4 $ret is
On both machines, the SAS program is executed. On the XP box, echo and copy don't work. Any ideas?
Thank you for your help.
David
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PERL stopped working for built-in DOS functions under XP
by BrowserUk (Patriarch) on Jul 23, 2009 at 21:14 UTC | |
by ikegami (Patriarch) on Jul 23, 2009 at 21:59 UTC | |
|
Re: PERL stopped working for built-in DOS functions under XP
by ikegami (Patriarch) on Jul 23, 2009 at 22:09 UTC | |
|
Re: PERL stopped working for built-in DOS functions under XP
by syphilis (Archbishop) on Jul 23, 2009 at 23:07 UTC |