PrimaveraTard
MIS
This question is really basic but I'm having a Monday. Besides, this is why my handle is Perltard.
In the following code sample I keep getting an error reading, "Use of uninitialized value in join or string at G:\orant\REPORT60\DPRIS Web Page\CGI-BIN\table_backup.pl line 39." Now, I've tried to initialize the array the different ways I know how without screwing up the ending value of the array, but I'm not having any luck.
while ( my (@String) = $sth->fetchrow_array) {
#Print out the result
my $data="$table_Name.txt";
my @ltime = localtime;
$ltime[5]+=1900;
$ltime[4]=sprintf("%02d", $ltime[4]+1);
$ltime[3]=sprintf("%02d", $ltime[3]);
my $foldername = $ltime[4]."-".$ltime[3]."-".$ltime[5];
mkdir ("G:/orant/REPORT60/DPRIS Backup Data Files/$foldername"
;
open(DAT,">>../DPRIS Backup Data Files/$foldername/$data"
|| die("Cannot Open File"
;
print DAT "'";
print DAT join "', '", @String;
print DAT "'";
print DAT "\n";
close(DAT);
}
Could somebody please show me my ignorance! Thanks.
In the following code sample I keep getting an error reading, "Use of uninitialized value in join or string at G:\orant\REPORT60\DPRIS Web Page\CGI-BIN\table_backup.pl line 39." Now, I've tried to initialize the array the different ways I know how without screwing up the ending value of the array, but I'm not having any luck.
while ( my (@String) = $sth->fetchrow_array) {
#Print out the result
my $data="$table_Name.txt";
my @ltime = localtime;
$ltime[5]+=1900;
$ltime[4]=sprintf("%02d", $ltime[4]+1);
$ltime[3]=sprintf("%02d", $ltime[3]);
my $foldername = $ltime[4]."-".$ltime[3]."-".$ltime[5];
mkdir ("G:/orant/REPORT60/DPRIS Backup Data Files/$foldername"
open(DAT,">>../DPRIS Backup Data Files/$foldername/$data"
print DAT "'";
print DAT join "', '", @String;
print DAT "'";
print DAT "\n";
close(DAT);
}
Could somebody please show me my ignorance! Thanks.