Click here to get back home

Obtaining column type in Oracle table

 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
Obtaining column type in Oracle table Sean Nakasone 11-07-2007
Posted by Sean Nakasone on November 7, 2007, 7:18 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 McCauley on November 8, 2007, 7:53 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
oracle RAW data type and dbi February 12, 2008, 10:44 am
need help on cgi to get multi pages and could sort by column from Oracle March 27, 2008, 1:55 am
desc $table in DBI Oracle August 1, 2005, 12:27 pm
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. October 14, 2005, 3:08 am
Insert Log file into oracle table September 4, 2006, 6:04 am
How to print on the special table cell column? March 20, 2007, 11:33 pm
Find Missing Column and Extra Column March 12, 2007, 6:31 am
Numerically sort a file on a given column where column is a $var July 17, 2008, 5:29 pm
Building DBD::Oracle with the new Oracle Express product. November 7, 2005, 12:19 pm
how to load a picture to an oracle database with the Load a pictureto Oracle with DBI perl module December 3, 2004, 3:37 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap