I have a PERL script that prints to a network printer on a Windows XP
Professional OS.  The script will be used on a variety of XP systems
with varying network printers as the default printer.  When I run the
code shown below:
 
#! perl -w
use strict;
 
my $port='9100';
my $default_printer='10.1.5.211';
 
open(OUTPUT_PRINTER,">\\\\$default_printer\\$port") || die "Unable to
open printer: $!\n";
print OUTPUT_PRINTER "This is a test Line\n";

 
I get the message:  Unable to open printer: Permission denied
 
I have turned off the firewall to see if that was causing the error but
get the same response.  I am hoping that someone has some ideas on how
to accomplish printing to the default printer.  

Your assistance is appreciated.
 
Ronald G. Nichols
Director of Information Technology
Knouse Foods Cooperative, Inc.
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
(717) 677-8181 Ext. 3470
 
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to