Main( @ARGV ); exit( 0 ); sub Main { my $q = CGI->new; ## read form data print fancyDatabaseStuff( $q ); } sub fancyDatabaseStuff { my( $q ) = @_; my $action = $q->param('action'); if( !defined $action or !length $action ){ return ShowEmployees( $q ); } elsif( $action eq 'confirmDelete' ){ return ConfirmDeleteEmployees( $q ); } elsif( $action eq 'delete' ){ return DeleteEmployees( $q ); } else { return UnrecognizedAction( $q ); } } sub UnrecognizedAction { my( $q ) = @_; my $header = $q->header; return qq{$header
Ooops, don't know what to do, I didn't understand that }; }