#!/usr/bin/perl -w use strict; open(FH, '<', 'yourFileName.dat') or die "We have a problem: $!"; close FH;