Handling autodie errors 

try {
    do_something();
}
catch {
    when(':file') {
        say "File error in " . $_->function;
    }
    when('unlink') {
        say "Error unlinking file";
    }
    default {
        die $_;
    }
}