Click here to get back home

XML::LibXML findnodes Invalid Expression

 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
XML::LibXML findnodes Invalid Expression douglasforrest 09-10-2005
Posted by douglasforrest on September 10, 2005, 8:13 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 douglasforrest on September 10, 2005, 9:44 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
GD::Graph Invalid Data from DBI July 10, 2005, 12:28 am
Trying to catch invalid emails May 6, 2008, 10:58 pm
Trying to catch invalid emails June 10, 2008, 12:08 am
Invalid length of line read.... April 26, 2006, 2:36 am
Archive::Zip - zip file has "invalid" format October 5, 2006, 9:41 am
finding invalid method names April 27, 2007, 6:41 pm
time manipulation getting invalid times June 26, 2007, 10:08 am
where to get XML::LibXML? June 22, 2005, 6:01 pm
Possible bug in XML:LibXML December 16, 2007, 6:22 am
Invalid Page Fault With Win32::GUI Under Win98 July 9, 2004, 5:27 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap