sub test_something { my $tempdir = create_tempdir(); # ... }