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 ( #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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-07-29 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls