Click here to get back home

Perl web automation question ref javascript:dt_pop

 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 web automation question ref javascript:dt_pop phil court 09-09-2004
Get Chitika Premium
Posted by phil court on September 9, 2004, 12:38 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 Helterline on September 9, 2004, 2:25 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
Question about Javascript and Perl form November 1, 2004, 1:17 pm
need to clear cookies in IE using perl Win 32 IE automation September 8, 2006, 9:56 am
Encoding problem with automation of Word by Perl June 1, 2005, 5:01 pm
LWP and Javascript -- Not The Same Old Question October 22, 2006, 11:37 am
any tools to enable test automation for scripting language like perl? October 8, 2004, 6:45 am
web automation December 24, 2007, 1:34 am
OLE Automation of OmniPage 12: Newbie Qs July 31, 2005, 12:01 pm
Perl CGI and Javascript March 29, 2006, 12:54 pm
Insert JavaScript into Perl December 9, 2004, 4:16 pm
javascript to perl converter? December 6, 2005, 10:05 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap