hab da mal ein funktion gebaut:
sub getTypeSize(){
my $aref = $dbh->selectall_arrayref("SHOW Fields FROM @_[0]");
my %returnWert;
for my $row (@$aref){
my($Filed, $Type) = @$row;
$Type =~ /varchar((.*))/;
$returnWert{$Filed} = $1;
}
return %returnWert;
}
aufruf:
%TypeSize= &getTypeSize('KUNDEN');
print $TypeSize{'Name'};
print $TypeSize{'Email'};
Viel Spaß.