On Jan 2, Paul Kraus said:
>I don't think your solution will work.
>Since the count being taken is going to be sparadic.
>
>somelements only = 1 at the BOF but by EOF it equals 4. Since you tested
>per line your results will be bad because at test time for that line
>somelement only = 1 when actually it was equal to 4. Wow that confused
>me :)
My solution DOES work (as does Mr. Dixon's modification). EACH TIME a
field is encountered, I check to see if its %dup value is 1 or not. If
the value is NOT 1, I delete it from the hash.
>> if ($dup{field} == 1) { $vend{$field} = $value }
This is only true the FIRST time the field is seen. And 'field' should be
$field. My apologies.
>> else { delete $vend{$field} }
This happens ALL other times $field is encountered.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]