in reply to Another eval $@ question

sub html_to_pdf { my($pdffile,$htmlfile)=@_; $command = "htmldoc --webpage -f \"$pdffile\" \"$htmlfile\"";

(General recommendation) please (do a favour to yourself and)

use strict; use warnings;

As a side note you can use alternate delimiters:

my $command = qq|htmldoc --webpage -f "$pdffile" "$htmlfile"|;

is quite more readable IMHO. But then I would recommend you to use the list form of system which has the advantage of avoiding passing through the shell, which in turn you don't seem to need.

print $command."\n"; eval{system("$command");};

You plainly don't need eval. The actual call may fail, but the system command may well succeed. It is its return value, along with $?, that you have to check.