#!/usr/bin/perl use strict; use warnings; open (FILE, '+<', 'sample.txt') or die "Could not open sample.txt: $!"; close (FILE) or die "Could not close sample.txt: $!";