eval { ...; 1; # IMPORTANT! Do not remove. See: https://www.perlmonks.org/?node_id=11143055 } or do { ...; }; #### eval { ...; $x = 1; 1; } ...;