Click here to get back home

Perl module for accessing dbase files

 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 module for accessing dbase files Bill H 11-01-2007
Get Chitika Premium
Posted by Bill H on November 1, 2007, 8:16 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 Sherman Pendley on November 1, 2007, 10:12 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 Ekki Plicht (DF4OR) on November 2, 2007, 4:01 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
SSH Module: Accessing CLI box using SSH and not getting the return output?? November 12, 2006, 11:44 pm
Accessing Files through http? February 26, 2007, 9:06 am
Is there a Perl Module The Does GCC like precompile on C++ files? October 6, 2005, 4:38 pm
Can perl SHA1 module be applied to files? October 4, 2004, 10:34 am
need to find module tar.gz files May 24, 2007, 5:03 pm
what module could easiely load all files to a @array from a specified folder(and subfolders)? September 23, 2004, 1:02 am
Perl XML::Simple Accessing complex XML June 18, 2008, 8:05 am
Accessing Single Parameters in Perl Script March 23, 2005, 3:41 pm
Accessing TestDirector for Quality Center OTA API using Perl May 3, 2006, 3:53 pm
Accessing Public Folders of Exchange 2003/2007 using Perl Scripts January 10, 2007, 5:36 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap