#!/usr/bin/perl -w use strict; my @words; my %list; unless ($ARGV[1]){ print "Usage is oneword infile outfile\n"; exit; } open (WORDLIST, "$ARGV[0]")||die "Could not open file $!"; open (OUTFILE, ">$ARGV[1]")||die "Could not open file $!"; while (<WORDLIST>){push (@words => $_)} foreach (@words){$list{$_}=$list{$_}} #this works because if the hash +key #exists already it is replaced! foreach (keys %list){print OUTFILE;}
In reply to Re: File Checking
by the_slycer
in thread File Checking
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |