Chapter 5. ScalarsA single piece of data either a number or a string is called a 'scalar' in Perl. 5.1. Numbers - integers, real or floating-pointinteger (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
|
Follow me: