print "[$rate] [$team] $comment\n"; print "
"; print "$ip $gotdate\n"; print "

"; or this: print "($rate) ($team) $comment\n"; print "
"; print "$ip $gotdate\n"; print "

"; it prints out the list in the correct order, that is numerically with the highest rate on top, BUT after it prints the rows out, it then prints an equal amount of these: [][] [][] [][] or these ()() () () etc. I tried stripping spaces or newlines, tried using a if $i > 0 or if exists ($rate) with no success.