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.

Neil Watson
watson-wilson.ca


In reply to Re^2: Inappropriate ioctl for device error on system call by neilwatson
in thread Inappropriate ioctl for device error on system call by neilwatson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.