#! /usr/bin/perl use strict; use warnings; my $file = "/tmp/i_am_not_there.txt"; if ( open my $fh, '<', $file ) { print "oops\n"; } else { die "Oeffnen von $file fehlgeschlagen: $!\n"; }