[ale] Perl Question

Mike Fletcher fletch at phydeaux.org
Mon Jun 1 12:41:09 EDT 1998


> 
> Does anyone have experience with sending escape sequences or the like for
> HP printers via Perl?
> 
> Example - I have some reports that I would like to print in a landscape
> view.  Back in the dark ages (when I ran a lot of dBase code) to do a
> landscape print was:
> 
> @1,1 SAY CHR(27) + CHR(38) + CHR(108) + CHR(49) + CHR(79)
> 
> I would like to be able to do something similar with Perl.

printf '%c%c%c%c', 27, 38, 108, 49, 79;

print "\x1b", chr(38), chr(108), "\061\0117";

print join( '', map {chr $_} qw(27, 38, 108, 49, 79) );

-- 
Fletch                |                                            __`'/|
fletch at phydeaux.org   |       "I drank what?" -- Socrates          \ o.O'
678 443-6239(w)       |                                            =(___)=
                      |                                               U






More information about the Ale mailing list