hmm.. ok, the working for INSERT and UPDATe throws out my previous thoughts..
how is $rows declared? i see that it is a global.. maybe it's a scope issue? Can you (at least to verify this) have get() do
return $rows; and have remove() do
my $rows = get("affected"); ?
As for placeholders, being able to prepare calls for re-use is one advantage.. others include (perhaps best one last):
- legibility/maintenance of SQL -- not cluttered up with perl variables
- clarity of variables use -- seeing my @bind = ($x, $y, $z); is much eaiser to see and understand than mentally finding the $'s in the (esp if large) SQL statement.
- quoting/espacing -- DBI will take care of this for you, and save many headaches of dealing with backslashes/single quotes..