Send file to printer
From: Brian Volk (BVolk_at_HPProducts.com)
Date: 02/25/05
- Next message: Joe Mecklin: "Re: redefining Net::Telnet "escape" character"
- Previous message: Bret Goodfellow: "Perl error --> Global symbol requires..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "Beginners (E-mail)" <beginners@perl.org> Date: Fri, 25 Feb 2005 15:52:25 -0500
Hi All,
I have been searching Google for a while now and I can not find how to send
a file to the printer. For example I use the script below to get Material
Safety Data Sheets and store them in a directory ..where I can easily print
them out manually but what I would really like to do is send them to a
printer using a perl script. Can someone pls point me in the direction of
some documentations on this subject...
FYI, I'm using windows ... only at work though! :~)
Thanks!
use strict;
use warnings;
use LWP::Simple;
my $urlfile = 'C:/brian/MSDS/url_20.txt';
my $itemfile = 'C:/brian/MSDS/file_20.txt' ;
open(URL, "<", $urlfile) or die "couldn't read urls: $!";
open(ITEM, "<", $itemfile) or die "couldn't read items: $!";
my @urls = <URL> ;
my @items= <ITEM>;
close(URL);
close(ITEM);
while (@urls) {
my $url = shift(@urls);
chomp $url;
my $file = shift(@items);
chomp $file;
# this line will get and store the msds
my $msds = getstore($url,$file);
}
Brian Volk
HP Products
317.298.9950 x1245
<mailto:bvolk@hpproducts.com> bvolk@hpproducts.com
- Next message: Joe Mecklin: "Re: redefining Net::Telnet "escape" character"
- Previous message: Bret Goodfellow: "Perl error --> Global symbol requires..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]