in reply to Perl DBI update tables

G'day cbtshare,

The error message seems pretty clear. You're passing @activate_results (which has 15 elements) to execute() (which is only expecting 12 elements).

This is untested, so make sure you check this yourself, but it looks like you want:

$activate_stream->execute(@activate_results[0, 1, 3, 4, 6, 8 .. 14])

See "perldata: Slices" if you're unfamiliar with the @array[...] construct (it's called an array slice).

— Ken

Replies are listed 'Best First'.
Re^2: Perl DBI update tables
by cbtshare (Monk) on Dec 07, 2016 at 04:56 UTC
    thank you , this is what I wanted