Click here to get back home

secure login

 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
secure login probert 07-18-2006
Posted by probert on July 18, 2006, 12:46 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 Brian Wakem on July 18, 2006, 1:30 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
Search Beta Test :secure login without Password April 14, 2005, 3:53 am
Redirecting to my own login page instead of Apache Login March 24, 2008, 12:22 am
Secure FTP February 29, 2008, 6:14 am
no re 'eval' not secure enough August 20, 2004, 12:08 pm
web hoster won't secure CGI October 29, 2004, 6:02 pm
Secure Database Systems July 9, 2004, 3:41 am
Is HTTPS Proxy Secure? October 4, 2004, 12:20 am
Working in a secure site April 9, 2005, 3:44 pm
use WWW:Mechanize to read secure webpage June 13, 2006, 5:19 pm
Secure VPN Gateway - a Perl solution January 2, 2007, 7:31 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap