How to get the number e in Perl.

In order to obtain the number e in Perl you need to use the function exp and pass her argument 1. Here is a sample program:

▶ Run
#!/usr/bin/perl

print exp(1);

The program will display 2.71828182845905.

Other articles

Comments