my $txt = `pdftotext whatever.pdf -` or die 'ERROR running pdftotext'; say $txt; #### my $command_line = qq{pdftotext -enc 'UTF-8' '$path' -}; my $text = `$command_line` or die 'ERROR running pdftotext';