Click here to get back home

PERL/CGI Programmer wanted

 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
PERL/CGI Programmer wanted Greg 10-31-2005
Get Chitika Premium
Posted by Greg on October 31, 2005, 9:13 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

Posted by A. Sinan Unur on October 31, 2005, 9:17 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
PERL/CGI Programmer Wanted October 31, 2005, 9:17 pm
Looking for a programmer - web queries December 11, 2006, 9:14 am
Why it's good to be a "lazy" programmer October 14, 2004, 12:48 am
Need perl+java programmer November 11, 2004, 9:43 am
Perl programmer needed May 18, 2005, 4:34 pm
perl programmer needed June 22, 2006, 2:12 am
URGENT NEED FOR PERL PROGRAMMER October 16, 2006, 5:57 am
required perl programmer October 10, 2007, 4:27 pm
Looking for any programmer ($850k+/yr telecommute) April 28, 2008, 10:50 pm
Displaying graphics - beginner programmer July 21, 2004, 1:24 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap