if ( $action eq 'new' ) { if (!$name) { &print_error; ###?### } &code_to_create_new(); }