Click here to get back home

How to generate radio buttons in Perl/CGI script with call to shell script?

 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
How to generate radio buttons in Perl/CGI script with call to shell script? prelim_questions 11-23-2007
Get Chitika Premium
Posted by prelim_questions on November 23, 2007, 11:24 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 Ron Bergin on November 24, 2007, 12:05 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
Gtk2 radio buttons problem July 4, 2005, 11:28 am
Gtk2 radio buttons problem July 4, 2005, 11:25 am
Program to generate buttons for sequence of commands February 9, 2006, 9:57 am
Sending Outlook Email w/voting buttons through a Perl script... November 19, 2004, 11:31 am
passing arguments to a shell script from a perl script December 7, 2007, 2:44 pm
execute a shell script in a shell script December 3, 2007, 8:30 am
Re: How to generate http error in script September 2, 2007, 6:32 pm
Re: How to generate http error in script September 2, 2007, 10:47 pm
Shell script September 27, 2005, 3:10 pm
starting CGi shell script February 4, 2005, 9:57 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap