my $action = param('action'); if ($action eq 'foo') { # Do stuff } elsif ($action eq 'bar') { # Do stuff }