Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Testing OS Commands

by astroboy (Chaplain)
on Feb 28, 2014 at 02:40 UTC ( #1076463=perlquestion: print w/ replies, xml ) Need Help??
astroboy has asked for the wisdom of the Perl Monks concerning the following question:

Is there a Test harness/module for testing the invocation of OS commands from Perl? I'd like to things like whether a file is in $PATH and whether it is executable

Thanks

Comment on Testing OS Commands
Re: Testing OS Commands
by Anonymous Monk on Feb 28, 2014 at 04:16 UTC
      Thank you...
Re: Testing OS Commands
by syphilis (Canon) on Feb 28, 2014 at 08:27 UTC
    ... things like whether a file is in $PATH

    The portable way to obtain a list of the directories in the path is:
    @path = File::Spec->path();
    Cheers,
    Rob

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-07-24 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls