Click here to get back home

How to get a colored subject

 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
How to get a colored subject ab 09-11-2007
Get Chitika Premium
Posted by ab on September 11, 2007, 6:06 am
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

Posted by Ben Morrow on September 11, 2007, 9:16 am
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
How can I get a colored subject in my Perl created e-mails. September 11, 2007, 6:11 am
UTF-8 subject in an email June 13, 2006, 7:58 am
printing a subject line October 16, 2007, 10:36 pm
Fetching to and from and subject from MIME:Parser October 13, 2004, 12:40 am
Subject: Make 1000 dollars over night March 7, 2005, 3:13 am
Print Subject without characters Just Numbers using POP3Client. Please Help April 10, 2007, 11:27 pm
Off subject: Permanent Perl Development role, Manhattan May 24, 2005, 9:16 am
How to print just numbers includes in Subject using POP3Client Module. April 9, 2007, 9:17 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap