develooper Front page | perl.beginners | Postings from March 2002

Re: moving data from text file to db

Thread Previous
From:
tom poe
Date:
March 6, 2002 06:50
Subject:
Re: moving data from text file to db
Message ID:
02030606491900.14660@aether
On Wednesday 06 March 2002 00:34, Jon Molin wrote:
- - - snip - - -
> something like this maybe:
>
> open (DATAFILE, 'somefile');
> while (<DATAFILE>)
> {
>    my @values = split /: /, $_;
>    my $sql = "insert into $values[0] ...
>    $dbh->do ($sql);
> }
>
>
> /Jon
- - - snip - - -

Hi, Jon:  Thanks.  That seems pretty good.  I'll post the code, when I get it 
working.  Tom

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About