Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Importing files with perl::dbi

by httptech (Chaplain)
on Jun 23, 2000 at 05:37 UTC ( [id://19542]=note: print w/replies, xml ) Need Help??


in reply to Importing files with perl::dbi

use DBI; my $dsn = "DBI:mysql:foobar"; my $user = "foobar"; my $pass = "baz"; my $textfile = "testing.txt"; open (TEXT, "$textfile") or die "Couldn't open textfile: $!"; $dbh = DBI->connect($dsn, $user, $pass,{ RaiseError => 1}) or die "Could not connect to database! $DBI::errstr"; { local $/ = undef; $dbh->do("INSERT INTO foo (bar) values (?)", undef, <TEXT>); } $dbh->disconnect; close TEXT;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://19542]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found