Chapter 5. Scalars

A single piece of data either a number or a string is called a 'scalar' in Perl.

5.1. Numbers - integers, real or floating-point

integer (decimal)

26
1_234_567_890
integer (hex/oct/binary)
0x1a            # hex     also written as    hex("1a");
032             # oct     also written as    oct("32");
0b11010         # binary  also written as    oct("0b11010");
                # all 3 equal to 26 decimal
real or floating-point
3.5e+3          # 3500