#!/usr/bin/perl -w use strict; use Getopt::Std; my $prog = $0; $prog =~ s|.*/||; my %opts; getopts('o:', \%opts); my $cmd = $opts{o} || 1; my %wordDb = (); unshift (@ARGV, "-") unless @ARGV; for my $file (@ARGV) { open (IN, "< $file") or warn ("Can't open $file: $!\n"), die; my $data = $_; print ("$file ==> $data\n"); close(IN); }