Click here to get back home

Senior Perl developer position in Montreal, Canada

 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
Senior Perl developer position in Montreal, Canada support 06-01-2007
Get Chitika Premium
Posted by support on June 1, 2007, 10:32 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 David H. Adler on June 1, 2007, 12:51 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 Developer Position - AT&T,Chicago or Raleigh, 22 months contract October 25, 2006, 9:26 pm
flood coming to free.superphone.canada August 7, 2007, 6:03 pm
URGENT: SENIOR SAP PP/MM ANALYST - San Jose, CA May 14, 2008, 4:51 pm
SENIOR SOFTWARE ENGINEER Internal Web Systems and Tools February 2, 2006, 2:30 pm
What's on at APL 2007, Montreal, October 21, (Tutorials) 22,23 (Program) August 31, 2007, 2:07 am
ACM SIGAPL / APL2007 Conference / Montreal / one week away October 15, 2007, 5:22 am
save & restore cursor position in perl December 25, 2004, 12:44 pm
Perl Developer neded. December 27, 2004, 9:56 am
Perl Web Developer Wanted! June 15, 2006, 4:00 pm
Perl Developer Positions in California March 11, 2005, 12:53 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap