my $file = "/full/path/to/file.txt"; open(FILE, "<", $file) or die "Whoops: $!"; do stuff close(FILE);