$random_file = "/home/sites/site70/web/cgi-bin/i-merchant/admin/setup/ric.txt"; open (FILE, $random_file); @LINES=; close(FILE); srand; $OTP = "$LINES[(int rand@LINES)]"; $PWFILE = $OTP; open (FILENEW, ">$random_file"); foreach $LINES (@LINES) { if ($PWFILE eq $LINES){ $LINES = "" } else { print FILENEW $LINES; } } close (FILENEW); $PPP = $OTP;