#!/usr/bin/perl -wT use CGI qw/:standard/; my $event = param('event'); my $commentUID = time(); my $newCOMMENT = param('newCOMMENT'); if ($newCOMMENT ne "") { open(AFH, ">> $event.txt"); print AFH "$commentUID\n"; close(AFH); open(BFH, ">> $commentUID.txt"); print BFH "$newCOMMENT\n"; close(BFH); }