$ touch file1; touch file2 $ perl blenge.pl $ rm file2; perl blenge.pl Error opening file2: No such file or directory $ rm file1; perl blenge.pl Error opening file1: No such file or directory $ cat blenge.pl #!/usr/bin/perl use strict; doit(); sub doit { open QTREES, 'file1' or return print STDERR "Error opening file1: $!"; open RTREES, 'file2' or (print STDERR "Error opening file2: $!") && return; }