This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldata: Only one "_" is allowed between each digit pair
authorKarl Williamson <public@khwilliamson.com>
Sat, 17 Sep 2011 18:16:15 +0000 (12:16 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sat, 17 Sep 2011 18:47:01 +0000 (12:47 -0600)
pod/perldata.pod

index 6d0fa0b..c54cb91 100644 (file)
@@ -294,7 +294,9 @@ integer formats:
     0b011011            # binary
 
 You are allowed to use underscores (underbars) in numeric literals
-between digits for legibility.  You could, for example, group binary
+between digits for legibility (but not multiple underscores in a row:
+C<23__500> is not legal; C<23_500> is).
+You could, for example, group binary
 digits by threes (as for a Unix-style mode argument such as 0b110_100_100)
 or by fours (to represent nibbles, as in 0b1010_0110) or in other groups.
 X<number, literal>