Trying to increment a specific value on a specific line in an array by 1 everytime the page is viewed.
My code does not error but it does not work
MADAXE
My code does not error but it does not work
MADAXE
Code:
foreach my $moddata2 (@data2) {
chomp $moddata2;
my ($TTITLE3,$COMMENT3,$NOPOSTS3,$PUSER3,$LOOKS3,$DATE3,$VUSER3,$ICON3,$tlink3) = split(/\|/, $moddata2);
if ($TTITLE eq $TTITLE3) {
$LOOKS3 += 1;
}
}
open (INF2, ">$dbdata2") || die qq(Can't open "$dbdata2" for write!\n);
print INF2 join("\n", @data2), "\n";
close(INF2) || die qq(Can't close "$dbdata2" after write!\n);