greeting all,
i have a perl script that net telnets to a serial device, which waits for data to insert into a DB.
I have been battling this serial device, which is programmed to send a carriage return at the end of each string. which it is (i telnet to it and watch the strings and it does do a return). the manual states that the carriage return has a control function of ^M and a decimal value of 013.
my code is (pretty much trying anything now):
$conn->waitfor(String => '/\xd\015\013\/');
which has had no effect what so ever, sits and waits for something but definitelly not what i am trying to find.
if i change it to (it sends a coma delimited list):
$conn->waitfor(String => ',');
then it loops through the string and inserts each individual data bit. which would be great, but i want the whole string inserted as 1 data value (eventually i will be creating an array of the list to insert into individual collumns, just need to get this part working).
i am a beginner here with perl, so any advice would be greatly appreciated!!!!
sean
i have a perl script that net telnets to a serial device, which waits for data to insert into a DB.
I have been battling this serial device, which is programmed to send a carriage return at the end of each string. which it is (i telnet to it and watch the strings and it does do a return). the manual states that the carriage return has a control function of ^M and a decimal value of 013.
my code is (pretty much trying anything now):
$conn->waitfor(String => '/\xd\015\013\/');
which has had no effect what so ever, sits and waits for something but definitelly not what i am trying to find.
if i change it to (it sends a coma delimited list):
$conn->waitfor(String => ',');
then it loops through the string and inserts each individual data bit. which would be great, but i want the whole string inserted as 1 data value (eventually i will be creating an array of the list to insert into individual collumns, just need to get this part working).
i am a beginner here with perl, so any advice would be greatly appreciated!!!!
sean