$count = 0; open (ZIPCODE, "<../Files/ZipCodes.txt") or die "Cannot open ZipCode: $1\n"; while () { chomp; ($Zip) = substr($_,0,5); ($State) = substr($_,5,2); ($AreaCode) = substr($_,7,3); ($City) = substr($_,10); $ZipDB{$Zip} = "$City|$State|$AreaCode"; $count++; } print "\nStored: $count\n"; $count = 0; foreach $Zip (%ZipDB) { print "$Zip = [$ZipDB{$Zip}]\n"; $count++; } close (ZIPCODE); print "\n$count Zip codes found\n";