in reply to Re: Sybase::BCP
in thread Sybase::BCP
The $tmp_file has a tab character between the two fields, $bin and $tid.open FILE,"<$file"; open OUTFILE, ">$tmp_file"; while (<FILE>) { s/^ +//; s/ +$//; s/ +/,/g; ($bin,$tid,$len)=split /,/; $bin = '0'x(6-length($bin)).$bin if length($bin) < 6; $tid=substr($tid,-$len,$len); print OUTFILE "$bin\t$tid\n"; } close OUTFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sybase::BCP
by mpeppler (Vicar) on Nov 03, 2004 at 14:44 UTC | |
by jilltw (Initiate) on Nov 03, 2004 at 15:05 UTC | |
by mpeppler (Vicar) on Nov 03, 2004 at 15:22 UTC | |
by jilltw (Initiate) on Nov 03, 2004 at 16:11 UTC | |
by mpeppler (Vicar) on Nov 03, 2004 at 16:36 UTC |