Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: piping to lp is broken after perl upgrade

by myuserid7 (Scribe)
on Oct 14, 2009 at 20:51 UTC ( [id://801207]=note: print w/replies, xml ) Need Help??


in reply to Re: piping to lp is broken after perl upgrade
in thread piping to lp is broken after perl upgrade

Thanks for your reply.

I created a files called test.ps.

$ cat test.ps %!PS /Courier findfont 20 scalefont setfont 72 500 moveto (Hello world!) show showpage
If I send it to the printer, it works. I get a Hello World.

So here is a recreation of the script that is failing.

#!/opt/csw/bin/perl -w use strict; use warnings; my $prolog = <<ENDPROLOG; %!PS /Courier findfont 20 scalefont setfont 72 500 moveto (Hello world!) show showpage ENDPROLOG my $PRINT_CMD = '/usr/bin/lp -o nobanner'; 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: $!";

Replies are listed 'Best First'.
Re^3: piping to lp is broken after perl upgrade
by myuserid7 (Scribe) on Oct 15, 2009 at 22:15 UTC
    I ended up abandoning the use the csw perl for this script. Instead, I pulled the 5.8.9 source and complied it on my Solaris 10 machine using gcc4.

    I pointed the test script at the new compile and it started working.

    Sadly, I am not that confident in the blastwave perl now. Surely just paranoia but once bitten...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2025-03-27 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (69 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.