Re: INSERT in Perl
Since your statement doesn't return any rows, it doesn't need to be prepared. If you're doing multiple inserts like this you can prepare the statement, but not like that.
When you prepare a statement, you do that with placeholders, then when you execute you supply values for the placeholders. Placeholders are a question mark.
The insert would be something like this:
INSERT INTO $table (symbol,expn_dt,strike,open,bid,ask,last,volume) VALUES(?,?,?,?,?,?,?,?);
The execute:
$sth->execute($h1{'symbol'},$exp,$h1{'strike'},$h1{'open'},$h1{'bid'},$h1{'ask'},$h1{'last'},$h1{'volume'});
Or you could simply:
#sth->do($ins_rec);
It's not likely the $ins_rec is hampered by the strict. It must be a different variable in the interpolation that hasn't been declared previous to this statement. Make sure %H1 and $exp have both been declared prior to this statement.