For Tux:
#!/usr/bin/env perl -l use strict; use warnings; use Text::CSV; my $csv = Text::CSV::->new(); my $cols = @{ $csv->getline(\*DATA) }; my $query = 'INSERT INTO table (' . join(',' => map { "col$_" } 1 .. $ +cols) . ') VALUES (' . join(',' => ('?') x $cols) . ')'; print $query; __DATA__ a,b,c,d [download]
Output:
INSERT INTO table (col1,col2,col3,col4) VALUES (?,?,?,?) [download]
www.com | www.net | www.org
Great! It updates last hour of cb and helps me join a discussion The! Worst! Thing! Ever! It always ignores my self-upvotes for cb stats!!?! Somewhat useful in settling debates with coin flips and dice rolls Chatterbot? Nobody told me about it! Not my cup of tea. I do not do that live chat thingie...
Results (37 votes). Check out past polls.