username|password|fname|lname|user_info ####
##
## # use the CGI module, this automates processing of form input and takes care of a lot of security issues too use CGI; my $query = new CGI; $user_to_delete = $query->param('user'); #load the user file into an array open(FILE, '; close(FILE); #to find the row with your user, cycle through the rows, parsing each one and looking for the user name, and write all lines back to the user database except the one for the user in question open(FILE, '>user_data_file.txt'); for $i (0 .. $#user_data) { @this_user_info = split(/\|/, $user_data[$i]); if ($this_user_info[0] eq $user_to_delete) { #do nothing } else { print FILE "$user_data[$i]\n"; } } close(FILE);