Most beloved creatures on God’s earth,…Top of the Morning to you all.

I have the following script;
#! c:/perl/bin/perl.exe -slw use strict; use Win32; use Win32::ODBC; my $DSN = 'ORANGE'; my $DB = new Win32::ODBC($DSN) || die "Error => $!\n"; open (FILE, "$ARGV[0]") || die "\n$!\n"; chomp (my @data=<FILE>); print "\n\nPlease wait......Populating Database\n"; for my $entry (@data) { next if ($entry =~ /^start|^Full/i); my @db_values = split (/,/,$entry); #print "$db_values[0]\n"; $DB->sql("INSERT INTO Files (File_Path, File_Name, Size_Byte, Crea +ted, Modified, Accessed, Type) VALUES ('$db_values[0]','$db_values[5] +','$db_values[1]','$db_values[2]','$db_values[3]','$db_values[4]','$d +b_values[6]')"); } close FILE; $DB->Close; print “\n\nCompleted......Please check $DSN database\n\n”;
This code generated this error;
Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062. Use of uninitialized value in concatenation (.) or string at C:\Perl\O +range\pop_ db.pl line 18, <FILE> line 46062.
And this is the data I am feeding the script;
t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0021LETTER24JAN.doc,29696,1/24/2005,1/24/2005,7/7/2005,SYK0021LETT +ER24JAN.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0021LETTER30JUNE.doc,25088,6/29/2005,6/29/2005,7/7/2005,SYK0021LET +TER30JUNE.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0042LETTER13JAN.doc,25088,1/13/2005,1/13/2005,7/7/2005,SYK0042LETT +ER13JAN.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER13APR.doc,29184,4/13/2005,4/13/2005,7/7/2005,SYK0099LETT +ER13APR.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER13MAY.doc,29184,5/13/2005,5/13/2005,7/7/2005,SYK0099LETT +ER13MAY.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER16JUNE.doc,30208,6/15/2005,6/15/2005,7/7/2005,SYK0099LET +TER16JUNE.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER17JUNE.doc,25600,6/16/2005,6/16/2005,7/7/2005,SYK0099LET +TER17JUNE.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER20MAY.doc,29696,5/20/2005,5/20/2005,7/7/2005,SYK0099LETT +ER20MAY.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER22JUNE.doc,29184,6/21/2005,6/21/2005,7/7/2005,SYK0099LET +TER22JUNE.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0099LETTER27APR.doc,28672,4/27/2005,4/27/2005,7/7/2005,SYK0099LETT +ER27APR.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0100LETTER17JAN.doc,25088,1/17/2005,1/17/2005,7/7/2005,SYK0100LETT +ER17JAN.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0123LETTER07APR.doc,24576,4/7/2005,4/7/2005,7/7/2005,SYK0123LETTER +07APR.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0131LETTER08JUNE.doc,25600,6/8/2005,6/8/2005,7/7/2005,SYK0131LETTE +R08JUNE.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0131LETTER17JAN.doc,29184,1/17/2005,1/17/2005,7/7/2005,SYK0131LETT +ER17JAN.doc,doc t:/uk legal/Sites and Property/Manchester/ADMINISTRATION/LETTERS 2005/ +SYK0131LETTER22APR.doc,29184,4/22/2005,4/22/2005,7/7/2005,SYK0131LETT +ER22APR.doc,doc
I am not really sure – O’ what a surprise – on how can I get rid of this annoying error….Can I relay on your vast knowledge and experience for guidance and a way to remediate this?

Thanking you for your valuable help indeed....Ta!
Blackadder

In reply to Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O by blackadder

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.