J
jc
Hello.
I'm inputting from a barcode reader to a serial port (with Active State
PERl 5.6.1 and using W2000). This sends strings similar to;
"abcdefg<cr>"
(ie a string with a carriage return on the end).
My problem is that the string presented in the Perl program is always 1
behind the current string just scanned.
I'm using code similar to;
############################
$/ = "\r"; # Set up the record separator
open( FRED, "+>COM1" ) or die "error message";
my $mystring;
$mystring = <FRED>;
print $mystring;
############################
Regards JC......
I'm inputting from a barcode reader to a serial port (with Active State
PERl 5.6.1 and using W2000). This sends strings similar to;
"abcdefg<cr>"
(ie a string with a carriage return on the end).
My problem is that the string presented in the Perl program is always 1
behind the current string just scanned.
I'm using code similar to;
############################
$/ = "\r"; # Set up the record separator
open( FRED, "+>COM1" ) or die "error message";
my $mystring;
$mystring = <FRED>;
print $mystring;
############################
Regards JC......