Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Testing OS Commands

by astroboy (Chaplain)
on Feb 28, 2014 at 02:40 UTC ( [id://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

Replies are listed 'Best First'.
Re: Testing OS Commands
by syphilis (Archbishop) 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
Re: Testing OS Commands
by Anonymous Monk on Feb 28, 2014 at 04:16 UTC
      Thank you...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-19 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found