PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Switch SEPARATOR between different BCP runs
Date: Nov 1 2003 1:02AM

On Fri, 2003-10-31 at 12:52, Jayson Pifer wrote:
> The proper way of doing this is supposed to be with the quote regex
> qr//.  I tested this method and it worked using this quick hack in the
> BLK module: 
> ------------------------------------------------------------------
> sub _readln {
>     my $sep = shift;
>     my $ln; 
>     my @d;
>     if(defined($ln = )) {
>         chomp $ln;
>         my $compiled = qr/$sep/;  ## Added line
>         @d = split(/$compiled/, $ln, -1); ## Used $compiled instead of
> $sep

Indeed. Thanks for the patch - I'll make the change in the main code
line.

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                 http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.mbay.net/~mpeppler/resume.html