Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Check for another program availability

by Anonymous Monk
on Apr 11, 2021 at 13:37 UTC ( #11131105=note: print w/replies, xml ) Need Help??


in reply to Check for another program availability

Second IPC::Run can_run(), which is in core.

But if you really want to iterate over PATH, core module File::Spec has a path() that returns the components of PATH or the OS equivalent. It handles Windows (split on /;/<code> not <code>/:/) and I believe even VMS (SYS$PATH or something similar, not PATH).

Replies are listed 'Best First'.
Re^2: Check for another program availability
by marto (Cardinal) on Apr 11, 2021 at 13:51 UTC

    IPC::Run isn't core, and does not have a can_run method. I think you've confused this with IPC::Cmd which is, and does.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-06-15 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (67 votes). Check out past polls.

    Notices?