and just so you don't try to load any blank lines into the hash and get an
error, throw in a check for blank lines
>
> open (INPUTFILE, $your_input_file) or die "Error opening
> $your_input_file: $!\n";
> my %uniq_hash;
>
> while (<INPUTFILE>) {
next if /^$/; ## SKIP BLANKS
> (my $first_field) = (split)[0];
> unless ($uniq_hash{$first_field}++) {
> # The first check will pass and increment the key value
> # All further checks will fail
> print;
> }
> }
> close (INPUTFILE);
>
> In principle this quite similar to
> perldoc -q 'How can I remove duplicate elements from a list or array?'
>
> >
> > Thanks very much,
> > Paul
> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]