コマンドのファイルパスの取得
File::Whichモジュールで取得できます。
use strict; use warnings; use File::Which; my $cmd = 'ping'; my $path = which($cmd); print $path, "\n"; # C:\windows\system32\ping.EXE
use strict; use warnings; use File::Which; my $cmd = 'ping'; my $path = which($cmd); print $path, "\n"; # C:\windows\system32\ping.EXE