________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Funk Sent: Wednesday, August 08, 2007 14:59 To: perl-win32-users@listserv.ActiveState.com Subject: hash table question What exactly does the following Perl code do? %hash=(); This should be my %seen = (); open(PREVFILE, $prevfile) or die("Unable to open previous file"); while(<PREVFILE>) { chomp; last if /BREAK/; $seen{$_}++; } close(PREVFILE); TIA, removing the carriage return info as defined on your system and counting all occurances of whatever it finds on the lines it reads. If it finds the characters BREAK ( since it is done this way, it could be anywhere on the line, BREAKDOWN or xxBREAK or BREAKnnn ), but will not exist the processing if it sees break ( Must be capitalized to get out early ). If this is all then you are not seeing the actual totals, but is just placing in the hash keyed by whatever you are reading in. Wags ;) David M. Funk President/CEO Tivoli Certified Enterprise Consultant Specializing in Network and Systems Management Solutions Trinity Solutions 604 Cassandra Dr. Suite 204 Cranberry Twp., PA 16066 Phone: 724-316-0721 Fax: 724-772-7889 email: [EMAIL PROTECTED] ********************************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **********************************************************************
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs