Leser: 17
1 2 3 4 5 6 7 8 9
sub convert_to_float { my ( $number ) = @_; $number = sprintf '%.02f', $number || 0; $number =~ s/.(\d*[1-9])?0*\z/,$1/; return $number; } convert_to_float(1); __END__ Use of uninitialized value $1 in concatenation (.) or string
2010-03-25T11:58:44 esskarconvert_to_float(1); z.b.
raus kommen soll dann 1,
Guest werNicht alles gelesen oder?
$number =~ s/\.((?:\d*[1-9])?)?0*\z/,$1/;
$number =~ s/\.((?:\d*[1-9])?)0*\z/,$1/;