That's asking the wrong question. You should test the errors in a locale independent fashion with the help of the constants from the standard Errno module, see <http://perldoc.perl.org/Errno.html> and <http://man.he.net/man3/errno>.
It could mean to require you to restructure the exception handling to return not a string, but something with better semantics, e.g. an object, see chapter 13 of PBP, <http://p3rl.org/Exception::Class>, <http://p3rl.org/Throwable>.
signature.asc
Description: This is a digitally signed message part.