Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: piping to lp is broken after perl upgrade

by moritz (Cardinal)
on Oct 12, 2009 at 22:29 UTC ( #800815=note: print w/replies, xml ) Need Help??

in reply to piping to lp is broken after perl upgrade

You should check if open was successful, and also if close was:

open my $output, '|-', $PRINT_CMD or die "Can't open pipe to $PRINT_CMD: $!"; print $output $prolog; ... close $output or warn "Error while closing pipe to $PRINT_CMD: $!";

Maybe that'll give you some clue about what's wrong.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: piping to lp is broken after perl upgrade
by myuserid7 (Scribe) on Oct 12, 2009 at 23:26 UTC
    I got excited when I saw your close - I thought for sure the open handle was causing the grief.

    Added the error checking. Nothing.

    Something is foobar here and I am not sure it is perl. Even from the command line...

    cat | /usr/bin/lp -o nobanner
    prints the postscript code while...
    /usr/bin/lp -o nobanner
    Prints the postscript document. So I really can't expect my perl script to work as written.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://800815]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2023-12-01 03:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found