Plugging my own module DBIx::Simple seems appropriate :) It has a method called flat that flattens whatever the query returned. Ideal for gathering lists like this.
All you need after creating the database object (here $db) is:
my @swearwords = $db->query("SELECT word FROM swearwords")->flat;
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: creating an array from MySQL results
by Juerd
in thread creating an array from MySQL results
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |