The $fullfilename exists. There are some commands that run earlier that work fine:
# Unzip file here
system("gunzip $fullfilename") == 0
or die "Cannot gunzip $fullfilename $!";
open FH, "file $fullfilename | "
or die "Cannot open fullfilename: $fullfilename $!";
my $filetype = <FH>;
close FH;
if ($filetype =~ /ASCII/ || $filetype =~ /ISO-8859/) {
latex_template("$dirname/print.files.txt", $filename, $data[2]);
system("latex banner.$$.tex") == 0
or die "Cannot latex banner.$$.tex $!";
system("dvips banner.$$.dvi -o banner.$$.ps") == 0
or die "Cannot dvips banner.$$.dvi $!";
if ( -e $fullfilename ){
print "File to be enscripted ($fullfilename) exists";
}
system("$ENSCRIPT $fullfilename -o $TEMPDIR/$dirname.$filename.ps")
+ == 0
or die "Cannot $ENSCRIPT $fullfilename -o $TEMPDIR/$dirname.$fil
+ename.ps: $!";
system("lp -d $PRINTER_NAME banner.$$.ps 2>$TEMPDIR/error.txt") ==
+0
or die "Cannot lp -d banner.$$.ps $!";
system("lp -d $PRINTER_NAME -n $num_copies -q $job_priority $page_l
+ist $TEMPDIR/$dirname.$filename.ps 2>$TEMPDIR/error.txt") == 0
or die "Cannot lp -d $TEMPDIR/$dirname.$filename.ps $!";
I also tried replace the output file ($TEMPDIR/$dirname.$filename.ps) with a known good location. The enscript command actually does create the postscript file. This makes the existence of the error that much more confusing.
|