Click here to get back home

table sorting

 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
table sorting Raistlin Majere 05-03-2006
---> Re: table sorting Brian McCauley05-03-2006
  ---> Re: table sorting Raistlin Majere05-03-2006
  |   |--> Re: table sorting Raistlin Majere05-04-2006
  |   `--> Re: table sorting Raistlin Majere05-04-2006
  ---> Re: table sorting Brian McCauley05-04-2006
  | |--> Re: table sorting Raistlin Majere05-04-2006
  | `--> Re: table sorting Brian McCauley05-04-2006
  |--> Re: table sorting Raistlin Majere05-04-2006
  |--> Re: table sorting Raistlin Majere05-04-2006
  |--> Re: table sorting Raistlin Majere05-04-2006
  |--> Re: table sorting Raistlin Majere05-04-2006
  |--> Re: table sorting Brian McCauley05-04-2006
  `--> Re: table sorting Raistlin Majere05-04-2006
Posted by Raistlin Majere on May 4, 2006, 10:34 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 Raistlin Majere on May 4, 2006, 10:41 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 Raistlin Majere on May 4, 2006, 10:48 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 Paul Lalli on May 4, 2006, 1:22 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 Brian McCauley on May 4, 2006, 3:57 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
Sorting a nested array (table) (alphabetically) September 29, 2005, 2:44 am
Formatting a single line without effecting the entire table with the Text::Table module March 10, 2005, 11:18 am
Pb of key in a table September 20, 2005, 4:50 am
DBI and symbol table August 20, 2005, 3:12 pm
Help with a HTML table April 4, 2006, 8:47 am
How to get table from some html February 5, 2007, 12:48 am
how to new Table in a loop? March 21, 2007, 3:09 am
data table using May 18, 2007, 6:28 pm
Table creation March 21, 2008, 10:22 am
CGI.PM and print table April 13, 2008, 12:13 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap