$seq = 'KLLS3'; $point = 'weight'; $index = 4; $mean = 1.443; sorting($seq, $index, $point, $mean); sub sorting { if ($_[0] eq "KLLS3_LT.V4_0") { if ($_[1] == "1") {push @{{$_[2]}{$_[0]}{$_[1]}}, $_[3];} }