- or download this
select name, address, phonehome, phonework from addressbook;
- or download this
select name from addressbook;
- or download this
$info = {
name => "fred",
};
- or download this
my @case;
while( my $info = $sth->fetchrow_hashref) {
push @case, $info->{name};
}
print "@case\n"; # prints built up @case.
- or download this
my $names = $dbh->selectcol_arrayref(
"select name from addressbook where name like ?",
...
my @case = @$names; # If you'd rather deal with an array
print "@case\n"; # prints out ALL of the names selected.