Click here to get back home

how to convert the following ASP code to perl code

 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
how to convert the following ASP code to perl code DavidNorep 05-06-2007
Get Chitika Premium
Posted by DavidNorep on May 6, 2007, 8:35 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
convert Vbscript to Perl code January 15, 2007, 8:31 am
Perl code to convert from CSH to BASH?? January 27, 2008, 3:56 am
Code Quality and examples from the Perl source code April 11, 2006, 10:22 am
Separate Javascipt code from pure Perl code May 7, 2007, 3:58 am
Why my code doesn't look Perl-ish? November 4, 2005, 7:57 pm
Perl code encryption March 9, 2005, 12:56 pm
some perl code shit (run it) May 15, 2005, 5:42 pm
exit code in perl July 8, 2005, 2:22 pm
perl code doubt August 3, 2005, 5:55 am
generating perl code from awk July 12, 2006, 3:14 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap