app_perl: print return code if perl_parse() failes

(cherry picked from commit 6c5ebff42c1ee702ab4a859ffdd5ffeccbf8e11d)