for($i = 2; $i <= $#files; $i++)
{
print "<tr><td class=cells>$files[$i]</td>";
if(@already_banned =~ /$files[$i]/i)
{
print "<td class=cells style=color:red>BANNED</td></tr>";
}
else
{
print "<td class=cells><input type=checkbox value=$files[$i] name=addtoban></td></tr>";
}
}
idea of the script: checks out a list of names retrieved from a directory and put into the @files array. RUns a for loop on $#files and prints out stuff (html)
it checks the current $file[$i] against the contents of the @already_banned array (shouldn't this check all the elements of the array?) if it finds the $files[$i] in the @already_banned array it should prduce an out put with banned in red in a table cell, if not it should print out a check box.
but it doesn't do that... it acts as if none of the $files are found... i know two of them are in the array.
Can anyone tell me whats going wrong? and maybe why?
Thanks
Siberdude
siberdude@settlers.co.uk
{
print "<tr><td class=cells>$files[$i]</td>";
if(@already_banned =~ /$files[$i]/i)
{
print "<td class=cells style=color:red>BANNED</td></tr>";
}
else
{
print "<td class=cells><input type=checkbox value=$files[$i] name=addtoban></td></tr>";
}
}
idea of the script: checks out a list of names retrieved from a directory and put into the @files array. RUns a for loop on $#files and prints out stuff (html)
it checks the current $file[$i] against the contents of the @already_banned array (shouldn't this check all the elements of the array?) if it finds the $files[$i] in the @already_banned array it should prduce an out put with banned in red in a table cell, if not it should print out a check box.
but it doesn't do that... it acts as if none of the $files are found... i know two of them are in the array.
Can anyone tell me whats going wrong? and maybe why?
Thanks
Siberdude
siberdude@settlers.co.uk