blueflashlight has asked for the wisdom of the Perl Monks concerning the following question:
$|++; # put the args to enscript in an array ... my @enscript_args = ( "--no-header ", "--escapes ", "--font=AvantGarde-Book24 ", "--no-job-header ", "--quiet ", "--output=- " ); # here is where gnu enscript is on this system ... my $enscript = "/usr/bin/enscript"; # wrap the opening of enscript in an eval block, # so we can catch problems and die gracefully ... eval { open2 (*FROMENSCRIPT, *TOENSCRIPT, "$enscript @enscript_args"); }; if ( defined ($@) && $@ =~ /^open2/) { warn "$me: open2 failed: $!\n$@\n"; die }; print TOENSCRIPT (@burstpage); my @burstpage_ps = <FROMENSCRIPT>; close(TOENSCRIPT); close(FROMENSCRIPT);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: need help with open2, please!
by stephen (Priest) on May 02, 2001 at 08:49 UTC | |
by gcomeaux (Novice) on May 02, 2001 at 22:08 UTC | |
by tilly (Archbishop) on May 03, 2001 at 07:06 UTC | |
by Anonymous Monk on May 06, 2001 at 10:26 UTC | |
by tilly (Archbishop) on May 06, 2001 at 15:38 UTC | |
by gcomeaux (Novice) on May 09, 2001 at 19:51 UTC | |
by blueflashlight (Pilgrim) on May 02, 2001 at 19:08 UTC |