Click here to get back home

regexp to sql wildcard conversion

 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
regexp to sql wildcard conversion Neil Shadrach 06-27-2005
Posted by Neil Shadrach on June 27, 2005, 2:16 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
Just a basic wildcard January 31, 2006, 6:20 pm
Whats the way of wildcard HoH extraction? January 17, 2005, 3:36 pm
wildcard the port in bind January 18, 2005, 3:27 am
Perl wildcard un-expansion November 19, 2007, 4:36 am
Module to match file names against a wildcard spec? June 16, 2005, 12:31 am
EDI 2 XML conversion October 29, 2005, 6:24 pm
C (I think) to Perl Conversion October 9, 2004, 9:47 pm
hex to binary conversion November 29, 2004, 4:00 pm
Time Conversion March 10, 2005, 6:16 pm
Batch POD Conversion September 9, 2005, 4:05 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap