#!/usr/bin/perl -w use strict; my $filename = "foo.txt"; open FILE, $filename or die "could not open $filename"; my @data = ; close FILE; print scalar @data;