Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

demerphq's scratchpad

by demerphq (Chancellor)
on Jun 07, 2004 at 02:47 UTC ( [id://361850]=scratchpad: print w/replies, xml ) Need Help??

use Data::Consumer::Dir; use Getopt::Long; my ($db,$user,$name,$procs); Getoptions( 'db=s' => $db, 'user=s' => $user, 'name=s' => $name, 'procs=i' => $procs ) or die "Bad args"; my $pid= $$; fork while $procs-->0 and $pid==$$; my $feed= Data::Consumer::Dir->new( root => '/etc/drop/' ); my $DBH=DBI->connect($db,$user,$name) or die "..."; $feed->consume(sub { my ($f,$spec,$fh)= @_; while (<$fh>) { my @f=split/,/,$_; $dbh->do('insert into foo (date,height,width) values (?,?,?)',un +def,@f); } });
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-03-29 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found