Click here to get back home

Looking for C++ macro processing solution

 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
Looking for C++ macro processing solution David Coppit 11-03-2004
Get Chitika Premium
Posted by David Coppit on November 3, 2004, 10:46 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 Bernard El-Hagin on November 3, 2004, 5:12 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 Bob Walton on November 3, 2004, 10:15 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
FTP from macro February 23, 2005, 3:11 pm
Re: Connector Macro Help November 15, 2007, 12:18 pm
VBA to Perl macro conversion September 17, 2004, 6:20 pm
add macro to sheet instead to module March 17, 2006, 2:02 pm
Editors that use Perl as their macro language June 1, 2005, 11:38 am
Editors that use embedded Perl as their macro language? June 1, 2005, 2:43 am
loading a macro programmatically in excel VBA or perl March 22, 2006, 6:10 pm
Help-> "Your vendor has not defined Win32::Process macro wait" July 13, 2005, 1:37 pm
Restart Debugger pl file Warning message: Macro _SC_OPEN_MAX October 6, 2005, 3:04 pm
Software error using CGI::Session - Your vendor has not defined Fcntl macro O_NOFOLLOW August 15, 2007, 9:57 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap