my $action = $cgi->param( 'action' ); if( $action eq 'show' ) { # ... } elsif( $action eq 'delete' ) { # ... } else { # ... }