Click here to get back home

Secure VPN Gateway - a Perl 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
Secure VPN Gateway - a Perl solution David Gempton 01-02-2007
Get Chitika Premium
Posted by David Gempton on January 2, 2007, 7:31 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 Tad McClellan on January 3, 2007, 9: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
Ciscotutorials.info is your gateway to the best October 10, 2007, 4:02 am
Selecting Default Gateway April 18, 2008, 1:45 pm
http://search.cpan.org/ getting 502 Bad Gateway error September 18, 2005, 1:50 pm
AWLP turns your PC into web-managed wireless access gateway January 4, 2005, 3:51 am
www.hetong168.com Chinese biggest contract website first A2A gateway October 17, 2005, 11:02 pm
need simple perl script to do secure data transmission July 28, 2004, 4:43 am
best perl l10n solution that can support online translation and change management April 3, 2006, 9:02 am
Siimple solution to "Access denied" problem with WinXP-apache-perl-cgi August 25, 2006, 10:20 am
Secure FTP February 29, 2008, 6:14 am
no re 'eval' not secure enough August 20, 2004, 12:08 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap