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 fine. But I need those
> switches for many of my command utilites on windows. I
> can't figure it out.

All these constructs are working fine for me with ActiveState 5.8 on Win XP.

Post the code that's causing problems. What's happening? Any error messages?
What version of Windows? What version of Perl (perl -v). What happens if you
run a command not built-in to CMD.EXE? (something like "mem /c" perhaps?)

> 
> I've spent hours on google trying to find a code
> snippet or comment with someone trying to use a
> switch. nada. I started experimenting with open(FH,
> $command|) but it doesn't seem to work either.

That's also working fine for me.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to