A single piece of data either a number or a string is called a 'scalar' in Perl.
integer (decimal)
26 1_234_567_890integer (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
| Prev | Home (Copyright Gabor Szabo) Perl Training Israel | Next |
| Exercise: Hello world | Scalar variables (use my) |