Dear Friends,
Following error i am getting while its functioning. Could you please help me to
find out what the error is ?
Use of uninitialized value in concatenation (.) or string at /xxx.pl line 18,
<STDIN> line 1.
Use of uninitialized value in concatenation (.) or string at /xxx.pl line 21,
<STDIN> line 1.
#!/usr/bin/perl
use DBI;
use strict;
use warnings;
my $### = "";
my $#### = "";
my $#### = "";
my $#### = "";
my $#### = "";
my $### = "";
my $### = "";
while (<STDIN>){
chomp;
($####, $####, $##, $#####, $####) = split(/-/);
print $##### . "->" . $##### . "->" . $#### . "->" . $##### . "->" .
$##### ;
}
$sql = "INSERT INTO Table(######, ######, ######, #####, #####, ####,
#####, #####, ####, ######, #####, ####, #####) values ('" . $#### . "', '" .
$#### . "', '" . $## . "','" . $##### . "', now(), '" . $### . "', '##', '##',
'##', '##', '##', '##', 0)";
$sql_x = "DELETE FROM Table WHERE ##### = '" . $##### . "' AND ##### =
'" . $## . "' AND ##### = '" . $#### . "'" ;
my $dbh = DBI->connect("dbi:mysql:DB;localhost","###","####") || die "Error
Opening DataBase: $DBI::errstr\n";
if ( $###=~m#XXX# ){
$dbh->do($sql_x);
}else{
$dbh->do ($sql);
}
if ($dbh->err()) { die "sql error $DBI::errstr\n"; }
$dbh->disconnect();
Many Thanks
Luke
Send instant messages to your online friends http://uk.messenger.yahoo.com