Click here to get back home

A simple photosharing application written in perl

 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
A simple photosharing application written in perl Rico 04-21-2007
Posted by Rico on April 21, 2007, 3:45 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 Sherm Pendley on April 21, 2007, 4:20 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
rsh daemon written in perl? December 12, 2004, 11:14 pm
new commands written in perl September 21, 2004, 11:57 am
Can services be written in Perl? December 14, 2005, 9:31 pm
Can device drivers be written in Perl? December 9, 2005, 9:55 pm
is there a minimal LDAP server written in Perl? April 13, 2005, 4:12 pm
Can (nearly) any Perl program be written on a single line? October 19, 2005, 5:30 pm
ID3 Tags written by Perl can not be modified by any other ID3 editor December 19, 2005, 7:33 am
Problem with my perl script - old records getting over written by new $completedData September 15, 2007, 10:56 pm
How to call a simple perl script from HTML without need of HTTPS but simple HTTP ? May 11, 2006, 4:37 am
Communication between Cgi and another perl application December 13, 2004, 2:14 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap