#!/usr/bin/perl

if(!($ARGV[0] =~ /^.*$/))
	{
	die "You didn't give me any files!\n";
	}

open(FILE, "<$ARGV[0]") or die "Error opening $ARGV[0]";
while (<FILE>)
	{
	@array = split(" ");
	$size += length($_);
	$lines++;
	for $i (@array)
		{
		$words++;
		}
	}

print "    $lines     $words   $size    $ARGV[0]\n";
