in reply to Text::CSV not able to execute insert query dynamically.

When you run this, what does the print $query output look like?

1 Peter 4:10

Replies are listed 'Best First'.
Re^2: Text::CSV not able to execute insert query dynamically.
by Ankur_kuls (Sexton) on Sep 16, 2014 at 20:42 UTC

    hi...its giving the expected value of $query

    '$row->[0]', '$row->[1]', '$row->[2]', '$row->[3]'
      But if you don't eval the string, Perl won't know to interpolate the values; it just inserts the literal $row->[0]. See my post above for a better solution.

      #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.