Help for this page

Select Code to Download


  1. 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}';
    
  2. or download this
    unable to open file file3:
    unable to open file file2:
    unable to open file file1: No such file or directory