#!/usr/bin/perl use strict; use warnings; use DBI; $\="\n"; my $db = DBI->connect(undef,undef,undef,{RaiseError=>1,AutoCommit=>0}); #$db->do("set client_encoding to 'LATIN1'"); my $i = $db->prepare('update newsgroups set description = ? where newsgroup = ?'); while (<>) { chomp; my ($group, $desc) = split(/\s+/, $_, 2); $i->execute($desc,$group); } $db->commit; __END__ aaa.inu-chan 0000000000 0000000001 m ab.arnet 0000000000 0000000001 m ab.general 0000000000 0000000001 y ab.jobs 0000000000 0000000001 y ab.politics 0000000000 0000000001 y abg.allgemein 0000000000 0000000001 y abg.amiga 0000000000 0000000001 y abg.comp 0000000000 0000000001 y abg.diskussion 0000000000 0000000001 y abg.english 0000000000 0000000001 y