Click here to get back home

de-taint doesn't work after upgrading perl

 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
de-taint doesn't work after upgrading perl mickjames 01-08-2005
Get Chitika Premium
Posted by mickjames on January 8, 2005, 2:49 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 Gunnar Hjalmarsson on January 9, 2005, 12: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 mickjames on January 8, 2005, 3:42 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
upgrading Perl / solaris 5.7 September 13, 2004, 12:56 pm
Unicode & Upgrading Perl August 3, 2006, 9:29 am
fetchall_arrayref failed since upgrading April 20, 2006, 11:30 am
problem upgrading Bundle::CPAN May 25, 2008, 12:21 am
Upgrading Bundle::CPAN freezes during tests September 25, 2007, 9:45 pm
Upgrading to CPAN.pm v1.76 install Bundle::CPAN fails May 10, 2005, 9:29 pm
FAQ 3.24 How can I get "#!perl" to work on [MS-DOS,NT,...]? February 1, 2005, 6:03 am
FAQ 3.23 How can I get "#!perl" to work on [MS-DOS,NT,...]? April 14, 2005, 11:03 pm
FAQ 3.23 How can I get "#!perl" to work on [MS-DOS,NT,...]? June 30, 2005, 10:03 am
FAQ 3.23 How can I get "#!perl" to work on [MS-DOS,NT,...]? August 12, 2005, 4:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap