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:\~p>perl test.pl
dir: /s: No such file or directory
-----
dir: /b: No such file or directory
-----
C:\~p>dir: /w: No such file or directory
C:\~p>

No problems when I run system("mem /c"). 



--- Bob Showalter <[EMAIL PROTECTED]>
wrote:

> 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.
> 



                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
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