Click here to get back home

Win32::TieRegistry -- replace string in the whole HKLM

 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
Win32::TieRegistry -- replace string in the whole HKLM MoshiachNow 11-21-2006
Posted by MoshiachNow on November 21, 2006, 4:57 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
Win32::TieRegistry March 3, 2006, 7:53 am
Getting permissions using Win32::TieRegistry March 9, 2008, 3:20 pm
Win32::TieRegistry Logon User Name March 9, 2005, 12:56 am
use Win32::TieRegistry if ($^O =~ /win32/i) June 1, 2006, 12:58 pm
replace string in file October 1, 2004, 9:03 am
how to replace string for all files under a dir? August 15, 2005, 7:05 pm
string replace problem May 21, 2006, 12:14 pm
replace string with variable May 29, 2006, 6:06 am
replace string contaning \n November 13, 2007, 4:46 am
How to replace the multi-line string January 20, 2005, 6:39 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap