Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

borisz's scratchpad

by borisz (Canon)
on Jun 01, 2004 at 15:53 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2015-11-29 20:19 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls