if ( $a ) { print for @b; } #### next if !$a; # Or `return` print for @b; #### print @b if $a;