At 11:35 AM 1/31/02 -0500, Dave Benware wrote: >The line system "dir foo.txt"; returned "Bad command or file name". > >foo.txt does exist and I can run dir foo.txt within a dos box just >fine. Interestingly to me, system "dir"; worked okay. I guess it >just won't take an argument. > >So, have I installed Perl improperly?
Nope. It just thinks that the name of the command you're running is "dir foo.txt". Separate the arguments explicitly, e.g.,: C:\WINDOWS>perl -e "system qw(dir mouse.txt)" Volume in drive C is WIN_C Volume Serial Number is 3C20-89C9 Directory of C:\WINDOWS MOUSE TXT 5,946 04-23-99 10:22p MOUSE.TXT 1 file(s) 5,946 bytes 0 dir(s) 7,113.59 MB free -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]