Click here to get back home

how to connect to sybase in perl

 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
how to connect to sybase in perl German 08-21-2007
Get Chitika Premium
Posted by German on August 21, 2007, 9:02 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 Larry on August 21, 2007, 1:32 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

Similar ThreadsPosted
perl dbi sybase number of columns? December 27, 2006, 5:27 pm
18 Use of uninitialized value at /opt/perl-5.005/lib/site_perl/5.005/sun4-solaris/Sybase/DBlib.pm line 450. May 16, 2005, 4:26 pm
connect a database in remote server (can connect to the server via SSH) July 17, 2007, 12:35 pm
dbd-sybase ppd October 22, 2004, 11:18 am
how to use perl to connect to the web? January 20, 2006, 10:36 pm
PAR and Sybase::CTlib on HP-UX February 1, 2007, 12:35 pm
Use perl to connect to MS Exchange September 20, 2005, 12:57 pm
how to install Sybase::DBlib??? August 22, 2004, 12:59 am
install_driver(Sybase) failed: February 15, 2006, 4:52 pm
Sybase connection error July 28, 2006, 9:07 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap