It connects properly to the database but @swearwords contains none of the stores swear words. I know they're in the database because my other script can read them different. I can't get the array to hold them though.my $data = qq(SELECT word FROM swearwords); my $sth = $dbh->prepare($data); $sth->execute() or die $dbh->errstr; while(my $ref = $sth->fetchrow_arrayref) { push @swearwords, $ref->[0]; }
Did I do something wrong?
In reply to creating an array from MySQL results by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |