Here's the code:
if (@folderContents) {
foreach my $indivFile (@folderContents) {
next if $indivFile=~m/^\.+$/;
my $fullUnit = $indivFile;
# escape the following "."
my ($name, $extension) = split (/\./ , $indivFile);
if ($extension) {
my @info;
my $info;
my $fileSize;
@info = stat($fullUnit);
$fileSize = $info[7];
print "<tr valign=top>\n";
print "<td align=center><img src=../images/icon_" . $extension . ".gif width=18 height=22></td>\n";
print "<td><a href=fileDownload.cgi?fileName=" . $fullUnit . ">$fullUnit<a></td>\n";
print "<td>[DATE]</td>\n";
print "<td>" . $fileSize . "</td>\n";
print "</tr>";
}
else {
print "<tr valign=top>\n";
print "<td align=center><img src=../images/icon_.gif width=20 height=22></td>\n";
print "<td><a href=listFiles.cgi?newDirectory=" . $fullUnit . ">$fullUnit<a></td>\n";
print "<td> </td>\n";
print "<td> </td>\n";
print "</tr>";
}
}
}
Here's the error:
User of uninitialized value in concatenation (.) at line 62
## which is this " print "<td>" . $fileSize . "</td>\n"
So what gives? I can't figure it out for the life of me. I'm sure it's something very obvious.
- MT
if (@folderContents) {
foreach my $indivFile (@folderContents) {
next if $indivFile=~m/^\.+$/;
my $fullUnit = $indivFile;
# escape the following "."
my ($name, $extension) = split (/\./ , $indivFile);
if ($extension) {
my @info;
my $info;
my $fileSize;
@info = stat($fullUnit);
$fileSize = $info[7];
print "<tr valign=top>\n";
print "<td align=center><img src=../images/icon_" . $extension . ".gif width=18 height=22></td>\n";
print "<td><a href=fileDownload.cgi?fileName=" . $fullUnit . ">$fullUnit<a></td>\n";
print "<td>[DATE]</td>\n";
print "<td>" . $fileSize . "</td>\n";
print "</tr>";
}
else {
print "<tr valign=top>\n";
print "<td align=center><img src=../images/icon_.gif width=20 height=22></td>\n";
print "<td><a href=listFiles.cgi?newDirectory=" . $fullUnit . ">$fullUnit<a></td>\n";
print "<td> </td>\n";
print "<td> </td>\n";
print "</tr>";
}
}
}
Here's the error:
User of uninitialized value in concatenation (.) at line 62
## which is this " print "<td>" . $fileSize . "</td>\n"
So what gives? I can't figure it out for the life of me. I'm sure it's something very obvious.
- MT