|
lug-bg: Re: malka KOREKCIQ [.dat s cyrilic(DOS) kam drug data format s cyrilic-1251]
- Subject: lug-bg: Re: malka KOREKCIQ [.dat s cyrilic(DOS) kam drug data format s cyrilic-1251]
- From: raptor@xxxxxxxxxx (raptor)
- Date: Fri, 15 Nov 2002 16:54:11 -0500
use DBI;
$dbh = DBI->connect(....);
my $query = 'INSERT INTO table(....) VALUES ';
open FILE, "<yourfilename.dat" or die "opalanka.... : $! ";
while (<FILE>) {
my $vals = '( ';
map { $vals .= "$_, " } split /\|/, $_;
chomp $vals; chomp $vals;
$dbh->do($query . $vals . ')' ) or die "hmmmm....: $! ";
};
close FILE;
hth
raptor
PS. po natatak mislq che i sam ste se oprawish...
perldoc -U DBI
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|
|
|