$a = -123.4_56; print "$a\n";
$a = -123.45_6; print "$a\n";
$a = -123.456_; print "$a\n"; # 28
-$a = 123.456E_12; print "$a\n"; # 29
-$a = 123.456E1_2; print "$a\n";
-$a = 123.456E12_; print "$a\n"; # 31
-$a = 123.456E_+12; print "$a\n"; # 32
-$a = 123.456E+_12; print "$a\n"; # 33
-$a = 123.456E+1_2; print "$a\n";
-$a = 123.456E+12_; print "$a\n"; # 35
+$a = 123.456E_12; printf("%.0f\n", $a); # 29
+$a = 123.456E1_2; printf("%.0f\n", $a);
+$a = 123.456E12_; printf("%.0f\n", $a); # 31
+$a = 123.456E_+12; printf("%.0f\n", $a); # 32
+$a = 123.456E+_12; printf("%.0f\n", $a); # 33
+$a = 123.456E+1_2; printf("%.0f\n", $a);
+$a = 123.456E+12_; printf("%.0f\n", $a); # 35
$a = 123.456E_-12; print "$a\n"; # 36
$a = 123.456E-_12; print "$a\n"; # 37
$a = 123.456E-1_2; print "$a\n";
$a = 123.456E-12_; print "$a\n"; # 39
$a = 1__23; print "$a\n"; # 40
$a = 12.3__4; print "$a\n"; # 41
-$a = 12.34e1__2; print "$a\n"; # 42
+$a = 12.34e1__2; printf("%.0f\n", $a); # 42
no warnings 'syntax' ;
$a = _123; print "$a\n";
$a = 1_23; print "$a\n";
$a = -123.4_56; print "$a\n";
$a = -123.45_6; print "$a\n";
$a = -123.456_; print "$a\n";
-$a = 123.456E_12; print "$a\n";
-$a = 123.456E1_2; print "$a\n";
-$a = 123.456E12_; print "$a\n";
-$a = 123.456E_+12; print "$a\n";
-$a = 123.456E+_12; print "$a\n";
-$a = 123.456E+1_2; print "$a\n";
-$a = 123.456E+12_; print "$a\n";
+$a = 123.456E_12; printf("%.0f\n", $a);
+$a = 123.456E1_2; printf("%.0f\n", $a);
+$a = 123.456E12_; printf("%.0f\n", $a);
+$a = 123.456E_+12; printf("%.0f\n", $a);
+$a = 123.456E+_12; printf("%.0f\n", $a);
+$a = 123.456E+1_2; printf("%.0f\n", $a);
+$a = 123.456E+12_; printf("%.0f\n", $a);
$a = 123.456E_-12; print "$a\n";
$a = 123.456E-_12; print "$a\n";
$a = 123.456E-1_2; print "$a\n";
$a = 123.456E-12_; print "$a\n";
$a = 1__23; print "$a\n";
$a = 12.3__4; print "$a\n";
-$a = 12.34e1__2; print "$a\n";
+$a = 12.34e1__2; printf("%.0f\n", $a);
EXPECT
OPTIONS regex
Misplaced _ in number at - line 6.