in reply to perl callable from bash?

Those error messages aren't generated by sh or by Perl, but by user code. Why don't you show us the code that generates those error messages.

Wouldn't hurt if you added the following line to your sh script and gave us the output.

echo "[$firname]"