Perl has two different types of scalar constants called literals: numeric literals and string literals.
Numeric literals are numbers, and Perl accepts several different ways of writing numbers. All the examples shown in Table 2.1 are valid numeric literals in Perl.
|Number||Type of Literal|
|12.5||A floating point number|
|15.||Another floating point number|
|.7320508||Yet another floating-point number|
|6.67E-33||Scientific notation (e or E is acceptable)|
|4_294_296||A large number with underscores instead of commas|
Numbers are expressed as you think they would be. Integers are just consecutive digits. For floating point (decimal) numbers, you use a decimal point where you normally ...