You have to tell perl to actually use the POSIX module. It's not enough to just put it in your @INC path, you have to specifically tell Perl to use it, as follows:
#!/usr/bin/perl use strict; use warnings; use POSIX; # This line loads the POSIX module and imports pow(). print pow( 2, 3 ); # See? Now it works.
By the way: my $number = pow( 2, 3 ); could be written like this instead: my $number = 2 ** 3;, and that wouldn't require the use of the POSIX module.
Dave
In reply to Re: standard perl routine
by davido
in thread standard perl routine
by rocketboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |