in reply to Re: Invalid character value for cast specification
in thread Invalid character value for cast specification

Slightly shorter still...
for my $ts (HTML::TableExtract->new(headers=>qw(Security Volume Previo +us High Low Today's Change)) ->parse($response)->table_states ) { for my $row ( $ts->rows ) { print join("\t", @$row), "\n"; $sth1->execute( @$row ) or die "Couldn't execute statement: " . $sth1->errstr; } }

Presuming that the s/// transformations may be unnecessary as tlm pointed out:

open CSEFILE, 'SCE.htm' or die "Failed to read SCE.htm\n"; for my $ts (HTML::TableExtract->new(headers => qw(Security Volume Prev +ious High Low Today's Change)) ->parse(do { local $/; <CSEFILE> })->table_states) { for my $row ( $ts->rows ) { print join("\t", @$row), "\n"; $sth1->execute( @$row ) or die "Couldn't execute statement: " . $sth1->errstr; } } close CSEFILE;

As to whether there are more efficent ways to do this, given the context you may be interested in the Finance modules.