Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Too much SQL not enough perl

by rnahi (Curate)
on Oct 10, 2005 at 05:08 UTC ( #498715=note: print w/replies, xml ) Need Help??


in reply to Too much SQL not enough perl

A realistic way of doing this efficiently in Perl is with List::Util.

use strict; use warnings; use List::Util qw(first); my @questions = ( 'a' .. 'z' ); my $column = 'q'; if ( first { $column eq $_ } @questions ) { print "'$column' is in <@questions>\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://498715]
help
Chatterbox?
[1nickt]: erix unfortunately that's there favourite spot. That's why they are usually spotted crawling *up* your leg.
[erix]: ha, the tick and, as it happens, also the curator (now a professor of Paleont.)
[1nickt]: s/there/their/, ugh sorry.
[Your Mother]: Heh. The only one I ever had on me, I caught on my shin, headed north.
erix looks nervously I got away cleanly from my run , it seems :)
1nickt doesn;t remember there being ticks in the old country ...
erix too fast for ticks!
[erix]: 'the old country' is where?
[erix]: that means britain for americans, is that right?
[perldigious]: We need to get more high tech about pest defense to prevent tick and mosquito problems. :-)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (15)
As of 2017-05-24 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?