Click here to get back home

perl/expect.pm manual user input

 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
perl/expect.pm manual user input R. Craw 02-19-2006
Get Chitika Premium
Posted by R. Craw on February 19, 2006, 7: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

Similar ThreadsPosted
localtime - user input - output in same format October 7, 2004, 1:27 am
Handling user input and program busy February 5, 2008, 2:24 pm
Perl output Javascript to validate user input April 4, 2006, 2:50 pm
How to make input user and password in perl script started on web? May 29, 2008, 4:15 pm
complete manual and reference September 25, 2005, 3:22 pm
trapping a manual close signal February 25, 2007, 12:27 pm
CoderWiki.com - A free online reference manual April 26, 2006, 1:02 pm
FAQ 8.9: How do I ask the user for a password? November 20, 2004, 12:03 am
user login February 20, 2005, 3:08 pm
FAQ 8.9 How do I ask the user for a password? March 10, 2005, 6:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap