in reply to need advice on conditionals

You could put the code in a block then last out of it, like this:
if ($action eq 'new') {{ if (!$name) { &print_error; last; } &code_to_create_new(); }}
The extra {} is the code block, which the last will exit.