Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: file test results not as expectedby Fletch (Bishop) |
on Nov 22, 2020 at 03:13 UTC ( [id://11123999]=note: print w/replies, xml ) | Need Help?? |
Using Path::Tiny
Also depending on your shell it may already have these cached. For instance ZSH provides a commands hash which maps from the command name to the corresponding file name.
Edit: Dump the ZSH cache with for i in "${(@onk)commands}" ; { printf "%20s\t%s\n" "$i" "$commands[$i]" } | less; of course keep in mind that the commands parameter shows only what would be found first on PATH; if you're looking for exhaustive (including things with matching names shadowed in subsequent directories) you'd want the other solutions.
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|