open(DATAFILEIN, "$catagory.dat") || print "Your listing is the first in this category!
"; flock (DATAFILEIN, 2); while() { @line_pair = split(/=/,$_); $time2 = $line_pair[6]; $currenttime = time (); $difference = $currenttime - $time2; #computing the number of seconds before it expires $expires = $expire_after_days * 86400; if($difference < $expires){ push (@temp,$_); } } flock (DATAFILEIN, 8); if (open(DATAFILEOUT, ">$catagory.dat") ) { flock (DATAFILEOUT, 2); print DATAFILEOUT "$time=$company_name=$email=$member1=$member1phone=$data=$expiretime=$pictureurl=$password=$website=$member2=$member2phone=$address=$citystatezip=$fax=$catlisting\n"; print DATAFILEOUT @temp; userlog();