Opening a missing file



examples/files-perl/open_missing_file.pl
#!/usr/bin/perl
use strict;
use warnings;

if (open my $fh, '<', "other_data.txt") {
    # should do here something
} else {
    warn $!;
}

The error message we get:

No such file or directory at examples/files-perl/open_missing_file.pl line 7.