use strict; use warnings; my $p2tExe = '/Desktop/p2t'; my $PathDocumentUnicode = "test.pdf"; my $converted_text= ""; eval { $converted_text = `/Desktop/p2t -nodiag -layout -enc UTF-8 $PathDocumentUnicode -` }; print $converted_text; #### eval { $converted_text = `$p2tExe, "-nodiag", "-layout", "-enc", "UTF-8", "$PathDocumentUnicode", "-"` };