Click here to get back home

Perl Standard for Remote Objects.

 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
Perl Standard for Remote Objects. Ilias Lazaridis 06-28-2007
Get Chitika Premium
Posted by Ilias Lazaridis on June 28, 2007, 8:14 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 J. Gleixner on June 28, 2007, 5:02 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 Ilias Lazaridis on June 29, 2007, 1:02 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
Remote.pm (File::Remote) problem February 28, 2006, 9:50 pm
Accessing a container objects state from aggregated objects August 14, 2006, 8:50 pm
i need to ssh to remote server using Perl September 11, 2006, 9:25 am
perl standard October 18, 2007, 7:19 pm
Net::SSH::Perl to connect to a remote server via a web page August 30, 2004, 10:07 am
using perl/cgi to access remote Haskell compiler. March 14, 2005, 6:32 pm
how to ftp to remote server and download files and then log out using PERL? August 7, 2005, 8:42 am
Help: how to run programs on a remote machine with Perl script... June 2, 2006, 12:43 pm
Net::SSH::Perl - How to set remote default file permissions December 13, 2007, 1:53 pm
using a remote smarthost to send mail from a perl script June 1, 2007, 6:20 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap