##
foreach $elem(@data){
($sub,$max)=split/\|/,$elem;
@found=grep /^$sub:/,@ref;
foreach $f(@found){
($id,$time)=split/\|/,$f;
if($time ne $max){
push @set,$id;
}
}
}
####
@set:
g123:1
g123:3
g984:2