You might want to check out the Win32::SerialPort module. I have a
script that uses it. The documentation describes how to create your
.conf file.
Here is part of it, to give you an idea:
###########################################
use strict;
use warnings;
use Win32::SerialPort;
my $comread;
#$serial is a Win32::SerialPort object that represents the comport.
#The line below declares it and ties it to the file handle INFILE
#using the configuration file HD_Queue.conf
my $serial = tie( *INFILE, 'Win32::SerialPort', "HD_Queue.conf" ) or
die("Couldn't tie! $^E\n");
#Infinite loop
while (1) {
#If there is data in the COM port buffer
while (<INFILE>) {
...etc.
###########################################
-----Original Message-----
From: swayam panda [mailto:[EMAIL PROTECTED]
Sent: Monday, November 07, 2005 9:38 PM
To: [email protected]
Subject: how to read write COM port
Hi ,
I have installed Perl 5.8.7 on windows XP. How to read from
COM
port .
when i am writing the program like this
open( PORT, "COM1" ) or die "Can't open COM1: $!";
my $in=<PORT>;
print "$in"
I am getting error msg that
permission denied at line 3
Thanks in advance
Swayam
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>