#!/usr/bin/perl -Tw use CGI qw(:standard); use strict; # delete a specific line if (param('action') eq 'delete' { open(FILE,"$file"); while() { chomp; ($company_name,$street,$city_st_zip,$phone,$fax,$website,$email,$category,$storefront,$logo,$alpha,$first_name)=split(/\|/); if (param($company_name) eq $company_name || ....) # match { push(@file,$_); } } close(FILE); open(FILE,>$file); { foreach (@file) { print FILE $_ . "\n"; } } }