Mark Funk asked: > What exactly does the following Perl code do? > > %hash=(); > > open(PREVFILE, $prevfile) or die("Unable to open previous file"); > > while(<PREVFILE>) { > chomp; > last if /BREAK/; > $seen{$_}++; > } > close(PREVFILE); Exactly, the code does nothing (since there is no output). I suspect the intent is to count the number of times each line of the file $prevfile occurs; but if $prevfile has a line which is just "BREAK" then only lines above that line are considered (otherwise all lines are considered).
--Suresh _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs