tomgracey has asked for the wisdom of the Perl Monks concerning the following question:

I'm sure this is a pretty easy one, but I've spent a long time searching on the internet and still haven't resolved the problem. I am trying to extract the lengths of the fields from a mysql table using DBI. Based on the documentation I read I wrote this code:
$sth=$dbh->prepare('SELECT * FROM userReports WHERE 1=0'); $sth->execute(); my $flh=$sth->{SCALE}; my @lengths=@{$flh}; print "@lengths";
If I substitute NAME for SCALE then I get an array of column names as expected. However, using SCALE I just get an array full of zeros. I wonder what the problem with this is? Also, is there a better way of doing this?