Click here to get back home

cgi.pm popup_menu define select width?

 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
cgi.pm popup_menu define select width? inetquestion 03-27-2005
Posted by Andras Malatinszky on March 27, 2005, 8:58 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 Alan J. Flavell on March 29, 2005, 6:43 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
Converts half-width katakana to their full-width counterparts April 12, 2006, 1:23 am
how to replace this like with June 20, 2006, 10:19 pm
IO::Select::select() says no readable data even if there are August 24, 2006, 2:53 am
The select() (IO::Select) function has a limit? June 2, 2008, 5:24 am
How do I use a variable-width positive look behind assertion? November 6, 2007, 5:52 pm
Perl OLE Excel - edit width/height Comment window May 8, 2008, 1:32 pm
Perl/unix script to convert a fixed width file to a tab delimited file September 29, 2007, 9:35 am
where to define this array? May 15, 2005, 10:52 pm
Define my own signal. May 12, 2006, 4:26 am
somewhat unusual way to define a sub April 7, 2008, 11:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap