my $sth = $dbh->prepare("SELECT *, DATE_FORMAT(...) as something from cases where caseid = ?"); $sth->execute($x); while (my $hash = $sth->fetchrow_hashref()) { my @row = @$hash{$col, "status", "something"}; ... }