Click here to get back home

Multiple FTP session

 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
Multiple FTP session Arun 08-31-2005
Posted by Arun on August 31, 2005, 7:33 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 John W. Krahn on September 1, 2005, 2:20 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
setting of session values from a script for the same session in which it is running May 23, 2005, 12:35 am
new CGI::Session creates a new session every visit. GRRR!!! March 15, 2007, 6:43 pm
CGI::Session How can a session be not expired and at the same time empty? June 14, 2007, 3:56 pm
CGI:Session porting to Apache:Session June 25, 2005, 10:31 pm
creating a new session when a session is expired May 17, 2006, 8:21 am
assigning multiple hash values to multiple variables May 2, 2006, 7:55 pm
Set ENV on different session August 6, 2004, 4:36 am
CGI::Session May 29, 2005, 8:00 pm
my $session = new CGI::Session() March 21, 2007, 9:34 pm
session July 7, 2008, 4:10 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap