Click here to get back home

signal handling and returning

 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
signal handling and returning Alex Hart 03-03-2005
Get Chitika Premium
Posted by Alex Hart on March 3, 2005, 6:55 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
Signal handling and modules October 4, 2004, 6:50 pm
Handling KILL signal in a perl script July 25, 2006, 8:26 am
POSIX signal handling: inputs needed November 21, 2007, 9:35 pm
Define my own signal. May 12, 2006, 4:26 am
signal HANDLER in perl April 25, 2007, 12:36 am
perl hangs after receiving signal April 1, 2005, 11:09 am
Text descriptions of signal codes? July 27, 2006, 12:11 pm
trapping a manual close signal February 25, 2007, 12:27 pm
Why can't we just change the signal disposition on system()? March 23, 2007, 8:50 pm
Signal handlers, objects and reference counting. February 4, 2006, 11:07 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap