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

borisz's scratchpad

by borisz (Canon)
on Jun 01, 2004 at 15:53 UTC ( [id://358156]=scratchpad: print w/replies, xml ) Need Help??

# does not work; propably group is not supported? use DBI; use Fatal ':void'; open my $fh, '>', '/tmp/xyz.csv'; binmode $fh; print $fh <<__CSV__; aa,bb,cc a,2,3 a,3,7 b,12,111 c,12,12 __CSV__ close $fh; my $dbh = DBI->connect(qq{DBI:CSV:}); $dbh->{'csv_tables'}->{'t_test'} = { file => '/tmp/xyz.csv', col_names => [qw/aa bb cc/]}; my $ar = $dbh->selectall_arrayref( q{ SELECT aa, COUNT(*) AS cnt, AVG( +cc) FROM t_test GROUP BY aa ORDER BY aa });
# produce wrong code! sub t{ shift->{x} = {@_} } my $x = bless ({}); $x->t(a => 12, b=> 13); print Dumper($x);

.vimrc for perl programmers
Let shortcut types have useful behavior in the parameterless case
String to Hex
Perl Module
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 pondering the Monastery: (5)
As of 2024-03-28 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found