Dear monks
I am confuse with these part of the program, I am trying to read a DBF with SELECT then all that put it in a FETCHROW_ARRAY() and from there to do INSERT INTO a MySQL table. But is giving my an error message like this Use of uninitialized value in concatenation (.) or string at pruebatest1.pl line 47. This is the code I hope you can help me to fix these part thank you ! these is the part of the code:
my $dbhX1 = DBI->connect('dbi:XBase(RaiseError=1):'); my $select1 = $dbhX1->prepare("SELECT * FROM r501"); $select1->execute(); print "\nEjecutar SELECT de r501\n"; my $mysql_dbh1 = DBI->connect("DBI:mysql:database=$datafilename;ho +st=localhost", "root", "xyz123", {'RaiseError' => 1}); while ( (my @row) = $select1 -> fetchrow_array() ){ my $sthsql = $mysql_dbh1->prepare ("INSERT INTO r501 (reg, pat, pe +d, adnasec, impexp, cveped, adnaent, crupimp, rfcimp, curpaa, tc, fle +te, seguro, embal, oincrem, odeduc, pesob, transal, tranarr, travent, + destino, nomimp, calleimp, numimp, numext, cp, mcpio, entfed, paisim +p, archivo) VALUES ($row[0], $row[1], $row[ +2], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9], $r +ow[10], $row[11], $row[12], $row[13], $row[14], $row[15], $row[16], $ +row[17], $row[18], $row[19], $row[20], $row[21], $row[22], $row[23], +$row[24], $row[25], $row[26], $row[27], $row[28], $row[29], $row[30]" +) }

In reply to Need help with Insert by padawan_linuxero

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.