Click here to get back home

Net::SFTP from memory instead of file?

 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
Net::SFTP from memory instead of file? Fearless Fosdick 08-22-2005
Get Chitika Premium
Posted by Fearless Fosdick on August 22, 2005, 6:49 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
Reading whole file into memory. Parsing 'C' like file efficently June 17, 2008, 6:49 am
Perl read file eat up my memory... June 1, 2008, 2:41 pm
Net::Sftp September 7, 2007, 12:35 pm
Perl takes a lot of memory when you just require a file February 15, 2007, 7:56 am
Specifying options for Net::SFTP December 28, 2007, 12:37 pm
perl open/close file leaks memory?? September 27, 2007, 1:30 am
Strange messages when using Net::SFTP May 12, 2005, 1:13 am
SFTP Close Function May 7, 2006, 8:53 pm
Error using perl Net::SFTP module July 14, 2004, 9:55 am
Net::SFTP ssh_args => [ ] syntax question... August 18, 2004, 12:57 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap