I do use both: use warnings; and use strict;.
Even though I was using $! to get the error message, I changed ascii_error() to die() supplying the full error in a reply to one of the posts above.
As to the rest of the suggestions the previous reply to your post explains me.