or download this
use strict;
my @items = ('file1', 'file2', 'file3');
open INPUT_FILE,"/no/such/directory/$items[2]" or print eval 'qq{unabl
+e to open file $items[2]: $!\n}';
open INPUT_FILE,"/no/such/directory/$items[1]" or print eval 'qq{unabl
+e to open file $items[1]: $!\n}';
open INPUT_FILE,"/no/such/directory/$items[0]" or print eval 'qq{unabl
+e to open file $items[0]: $!\n}';