Hi,
I would like to write a script to retrieve data from COM2. For example I am using a bar code scanner that will store store its data in memory to be accessed via COM2 l would ike to know where I can find information on completing such a script.
#!/usr/bin/perl -w
use strict;
open( PORT, "COM2" ) or die "Can't open COM2: $!";
while( <PORT> )
{
print"$_";
}
or using the read function to read from PORT2
$test = read(PORT,$buffer,255);
close( PORT );
Is the above code the right approach???
Thanks,
Mike...
I would like to write a script to retrieve data from COM2. For example I am using a bar code scanner that will store store its data in memory to be accessed via COM2 l would ike to know where I can find information on completing such a script.
#!/usr/bin/perl -w
use strict;
open( PORT, "COM2" ) or die "Can't open COM2: $!";
while( <PORT> )
{
print"$_";
}
or using the read function to read from PORT2
$test = read(PORT,$buffer,255);
close( PORT );
Is the above code the right approach???
Thanks,
Mike...