Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 cooling their heels in the Monastery: (14)
As of 2014-09-18 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (121 votes), past polls