good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Search a SQL Table and Delete Recordsby ww (Archbishop) |
on Aug 29, 2014 at 01:56 UTC ( [id://1098935]=note: print w/replies, xml ) | Need Help?? |
Learning Perl? Excellent! Learning Perl by applying it when not needed and in a way that makes the specific problem more complex to solve? Not usually advised. But for this quest: use DBI as recommended above; capture each row's id and the relevant field's contents to an array; use a regular expression to search the elements for whatever words you consider earmarks of spam (and NB roboticus' comment thereon) and when found, use the row id to tell your db engine to delete those rows. Adopting this scheme will be a SMOP... but one that is actually fairly 'simple' and one which provides a really relevant problem case for your effort to learn Perl.
In Section
Seekers of Perl Wisdom
|
|