in reply to Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O
Well, the offending line seems to be the one that starts with $DB->sql. Clearly, some element of @db_values is undefined. If that's OK with you, then do this:
Alternatively, leave that line as is and instead do something like this:{ no warnings 'uninitialized'; $DB->sql("INSERT INTO Files (File_Path, File_Name, Size_Byte, Cr +eated, Modified, Accessed, Type) VALUES ('$db_values[0]','$db_values[ +5]','$db_values[1]','$db_values[2]','$db_values[3]','$db_values[4]',' +$db_values[6]')"); }
my @db_values = map defined( $_ ) ? $_ : '', split (/,/,$entry);
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O
by jhourcle (Prior) on Jul 15, 2005 at 13:23 UTC |