Click here to get back home

Problems with Device::SerialPort (Modem Carrier Detection)

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problems with Device::SerialPort (Modem Carrier Detection) Hal Vaughan 12-08-2005
Get Chitika Premium
Posted by Hal Vaughan on December 8, 2005, 11:25 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
Loopback with Device::SerialPort? March 18, 2005, 1:24 pm
need help with Win32-SerialPort July 16, 2004, 4:58 am
Win32 SerialPort May 8, 2006, 2:59 pm
Replace substring "_.modem_" with modem price from $price ? September 9, 2005, 10:21 am
Setting RTS with Win32::SerialPort February 14, 2005, 2:12 am
lookfor failure in SerialPort November 30, 2005, 4:56 pm
Win32::SerialPort dead in 5.8? July 6, 2006, 2:19 pm
No response from printer using Win32::SerialPort October 10, 2006, 2:55 pm
Win32::SerialPort null char/0 RX/TX issue September 1, 2006, 8:25 am
perl and eof detection October 5, 2007, 9:37 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap