for ($x=0; $x<=511; $x=$x+2){ $z=$x+1; if (hex($temp{$x}) > hex($temp{$z})){ $string1 = $temp{$z}; $length = length($string1); if ($length eq 1){ $string1 = "0".$string1; } $string2 = $temp{$x}; $length1 =length($string2); if ($length1 eq 1){ $string2 = "0".$string2; } $hexzahl = $string1.$string2; $deczahl = hex($hexzahl); $calibtemp{$y}= $deczahl; $calibtemp1{$y}= $hexzahl; } else{ $string1 = $temp{$z}; $length = length($string1); if ($length eq 1){ $string1 = "0".$string1; } $string2 = $temp{$x}; $length1 =length($string2); if ($length1 eq 1){ $string2 = "0".$string2; } $hexzahl = $string2.$string1; $deczahl = hex($hexzahl); $calibtemp{$y}= $deczahl; $calibtemp1{$y}= $hexzahl; } open (filename, ">>tempi.dat") or die "Fehler","\n"; print filename "$y"," ","$calibtemp{$y}","\n"; print filename "$y"," ","$calibtemp1{$y}","\n"; close (filename); $y++; }