Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Check for another program availabilityby pryrt (Abbot) |
on Apr 10, 2021 at 20:52 UTC ( [id://11131093]=note: print w/replies, xml ) | Need Help?? |
if there's a core module that already takes care of such tasks Not core, but I use File::Which. It correctly handles some of the eccentricities of various operating systems, like correctly handling implied extensions like .bat or .exe on Windows systems. With this module, the same line of code which("perl") will correctly find my Strawberry perl.exe on Windows or /usr/bin/perl on Linux.
In Section
Seekers of Perl Wisdom
|
|