in reply to How to find whether an external commands exists
use File::Which; # exports which() my %paths; $paths{rm} = which('rm'); $paths{tar} = which('tar');
use IPC::Cmd qw[can_run run]; my $full_path = can_run('wget') or warn 'wget is not installed!';
|
|---|