RE: failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-17 Thread Bob Showalter
A B C wrote: Greetings, Does anyone know how to get perl to run windows commands like dir /b. Specifically, perl doesn't accept any type of argument switches. I've tried system(), exec() and backticks in my script. However, If I remove the switch, for example: system(dir). This works

RE: failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-17 Thread A B C
Hi, I'm using ActiveState v5.8.4 on Windows XP Home03. Here is the entire script... print `dir /s`; print \n-\n; system('dir /b'); print \n-\n; exec(dir /w); print \n-\n; === Here is the result after executing... C:\~pperl test.pl dir: /s: No such file or directory

RE: failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-17 Thread Bakken, Luke
I'm using ActiveState v5.8.4 on Windows XP Home03. Here is the entire script... print `dir /s`; print \n-\n; system('dir /b'); print \n-\n; exec(dir /w); print \n-\n; Since dir is a built-in, you should do this: use strict; print qx!cmd /c dir /s!; print \n-\n;

RE: failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-17 Thread A B C
Luke, Thanks! Your code works, you are a fantastic help. I've been surfing (and surfing and surfing) google for hours trying to find the answer. Your code works and now my testing can proceed :-) -Mark --- Bakken, Luke [EMAIL PROTECTED] wrote: I'm using ActiveState v5.8.4 on Windows XP

failure with: system(dir /b); exec(dir /b); `dir /b`

2004-09-16 Thread A B C
Greetings, Does anyone know how to get perl to run windows commands like dir /b. Specifically, perl doesn't accept any type of argument switches. I've tried system(), exec() and backticks in my script. However, If I remove the switch, for example: system(dir). This works fine. But I need those