Click here to get back home

please help with GD::Graph

 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
please help with GD::Graph bev_greg 07-30-2005
Get Chitika Premium
Posted by bev_greg on July 30, 2005, 6:33 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 Bob Walton on July 31, 2005, 4:15 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
perl graph theory (using Graph::Directed) July 26, 2004, 1:14 am
Graph.0.69 Module---how to get a DAG from graph with cycles January 23, 2006, 2:50 pm
GD Graph Pie Formatting November 30, 2004, 11:56 pm
CVS Activity Graph? March 16, 2005, 6:59 am
graph problem March 22, 2005, 3:43 pm
GD::Graph question June 2, 2005, 5:29 am
GD::Graph::bars August 26, 2005, 1:21 am
Graph.0.69 Module---how to get a DAG from.... January 23, 2006, 1:07 pm
Graph in Perl January 12, 2007, 11:44 pm
GD::Graph::lines July 14, 2008, 8:43 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap