in reply to need advice on conditionals

This does what you want:
if ($action eq 'new') {{ (print_error(), last) unless $name; code_to_create_new(); }}
... but it's ugly. Better off to just use if/then/else , for maintainability and clarity.