How can I list all available UNIX commands from Perl?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This code looks in each directory in your path (
split ":", $ENV{PATH}) for files (-f) that are executable (-x), and prints the ones it finds. You may want to read aboutAn alternative that does not search subdirectories of the directories in the
PATHis