Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: piping to lp is broken after perl upgrade

by moritz (Cardinal)
on Oct 12, 2009 at 22:29 UTC ( [id://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 foo.ps | /usr/bin/lp -o nobanner
    prints the postscript code while...
    /usr/bin/lp -o nobanner foo.ps
    Prints the postscript document. So I really can't expect my perl script to work as written.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-25 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found