in reply to Reading in and writing files

#Declare them outside the loop or else we will just over-write them. my (@delete, @userid, @username); $delete = param("Delete"); $userid = param("userid"); $deletename = param("deletename"); my $othercount = 1; while (@personal[$othercount]) { if ($personal[$othercount] eq "$deletename") { $personal[$othercount] = ''; } else { } $othercount++; } my $str = ''; $str2 = join(' ', $personal[1], $personal[2], $personal[3], $personal[ +4], $personal[5], $personal[6], $personal[7], $personal[8], $personal +[9], $personal[10]); $str = "require user $str2"; open FILE, ">.htaccess"; print FILE $str; close FILE; print " <span id=\'p1\' style=\'\'> <div class=\"finish\"> <div class=\"finish2\"> <img src=\"aimages/$image.jpg\" width=\"84\" height=\"84\" /></div><di +v class=\"finish3\"> <h1 class=\"style1\">$errtitle</h1> <p class=\"style1\">$errmsg<br /></p></span>"; } exit;
Im getting closer, but now instead of deleting the selected user, it deletes the first user. (Always)