$ perl -MPath::Tiny -E 'for my $dir ( split(/:/,$ENV{PATH}) ){say for grep {-f -x $_} path($dir)->children }'