in reply to Extracting records with unique ID

How about using hash with $USERNUM as key?
Instead this:
push(@Recs, "$USERNUM|$RECTYPE|$ASSET|$EXTK");
Try this:
push(@{$Recs{$USERNUM}}, "$RECTYPE|$ASSET|$EXTK");
Where Recs are defined somewhere above as my %Recs.
Then just go through hash and take all the records.
for my $USERNUM (keys %Recs) { for my $rec (@{$Recs{$USERNUM}}) { ($RECTYPE, $ASSET, $EXTK) = split /\|/, $rec; print "$USERNUM $RECTYPE $ASSET $EXTK\n"; } }

Regards,
s++ą  ł˝ ął. Ş ş şą Żľ ľą˛ş ą ŻĽąş.}++y~-~?-{~/s**$_*ee