#! /usr/bin/perl use strict; use warnings; my @files = ( $0, # dieses Skript 'nicht.da.txt', # nicht existent $0, # dieses Skript ); for my $file ( @files ) { open my $infh, '<', $file or do { warn "open($file,ro) failed: $!\n"; next; }; # ... print "file is open: $file: ", ref( $infh ), $/; }