Click here to get back home

lexical analyzer generators

 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
lexical analyzer generators Jay G. Scott 05-26-2005
Get Chitika Premium
Posted by Jay G. Scott on May 26, 2005, 1:43 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
Are python's generators / yield possible in perl? March 5, 2006, 6:30 pm
Emulating Generators: Iterators for Lists (Newbie) March 4, 2006, 7:17 am
dup a lexical filehandle February 10, 2006, 9:36 pm
Lexical file handles November 6, 2004, 3:17 pm
convention regarding lexical filehandles January 13, 2005, 7:09 pm
Lexical scoping question. February 10, 2005, 3:56 pm
localizing lexical aggregates July 14, 2005, 7:47 am
Tie and Lexical Filehandles or IO::File? August 28, 2006, 3:11 pm
[Proposal] Q: RE lexical scopes and sub declarations December 1, 2004, 1:49 pm
Why declare "my $something" on top if it's going to get a lexical scope in a subroutine? February 23, 2005, 11:26 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap