Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RE: A minor epiphany with grep and map

by mwp (Hermit)
on Jul 25, 2000 at 08:11 UTC ( #24245=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare(q{
        SELECT Table_PK, Name 
    ...
    }); $sth->execute;
    my %lookup = map { $_->[0], $_->[1] } 
                    @{ $sth->fetchall_arrayref };
    
  2. or download this
    $sth->bind_columns(
        map { undef ${$_}; \${$_}; } 
    ...
    while($sth->fetch) {
        print("$table_pk\t$name\n");
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://24245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2020-11-30 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?