any guess why the error message

P

prashant_ec2003

one of the lines in my script is
open(FH,"|system(dir) > E:\\a\\temp111.txt");

whenever i run perl <script-name>.it says bad command or file name .

but fewdays back it had worked well and the file temp111.txt was
created.but if i try to run the code again after deleting the
temp111.txt now it is not working .

Any idea or suggestions are welcome

Thanks
pras
 
T

Tintin

one of the lines in my script is
open(FH,"|system(dir) > E:\\a\\temp111.txt");

whenever i run perl <script-name>.it says bad command or file name .

but fewdays back it had worked well and the file temp111.txt was
created.but if i try to run the code again after deleting the
temp111.txt now it is not working .

Any idea or suggestions are welcome

You've either deleted Perl from your system or your environment has changed
and perl is not in your path.
 
B

Brian McCauley

one of the lines in my script is
open(FH,"|system(dir) > E:\\a\\temp111.txt");

whenever i run perl <script-name>.it says bad command or file name .

Try typing "system(dir)" by hand at the command prompt.

Do you get the same message?

If so then your problem has nothing to do with Perl.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top