Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
No such thing as a small change
 
PerlMonks  

Re: why IPC::Open3 can't execute MS-DOS "dir" command?

by moritz (Cardinal)
on Dec 04, 2009 at 11:40 UTC ( #811061=note: print w/ replies, xml ) Need Help??


in reply to why IPC::Open3 can't execute MS-DOS "dir" command?

I'm not a Windows user, so forgive my stupid question: Is there a dir.exe or dir.com binary? If not, it might be a shell builtin, and thus not be available for launching externally.

Anyway, for file listings you can also use glob or opendir, readdir, closedir or File::Find (or File::Find::Rule, which has the more convenient interface for newcomers).


Comment on Re: why IPC::Open3 can't execute MS-DOS "dir" command?
Select or Download Code
Re^2: why IPC::Open3 can't execute MS-DOS "dir" command?
by ikegami (Pope) on Dec 04, 2009 at 13:04 UTC
    nah, system tries to use cmd /c if it doesn't work without.
      Curious, is that documented somewhere?

      system mentions usage of the shell only for the case when there is a shell meta character in the command.

      perlport mentions that there might be commands which are invokable but don't exists as files, but doesn't mention that perl makes extra effort to makes them invocable.

        Probably not.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811061]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-04-17 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls