home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cse.unsw.edu.au
/
2014.06.ftp.cse.unsw.edu.au.tar
/
ftp.cse.unsw.edu.au
/
pub
/
doc
/
languages
/
perl
/
nutshell
/
ch4
/
evalstudy
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1992-10-18
|
344 b
|
13 lines
$search = 'while (<>) { study;';
foreach $word (@words) {
$search .= "++\$seen{\$ARGV} if /\b$word\b/;\n";
}
$search .= "}";
@ARGV = @files;
undef $/; # slurp each entire file
eval $search; # this screams
$/ = "\n"; # put back to normal input delim
foreach $file (sort keys(%seen)) {
print $file, "\n";
}