I have code such as that below and it works fine unless the command "my_command" is not found. Then it spits out an error such as:
Can't exec "my_command": No such file or directory
How can I print my own error message instead of the one above if the command is not found? I realize I could turn off warnings, but I don't really want to do that.
#!/usr/bin/perl -w
use strict;
my $output=`my_command -v`;