in reply to Customised error messages

Read the section about backticks in perlop to learn how to capture STDERR.

But I wouldn't use ls to perform this simple check. Instead use the builtin file checks (eg -r checks if the file is readable).

Clint