According to perlop, the exponentiation operator has a higher precedence than unary minus, so you need parentheses to disambiguate your expected precedence:
print (((-2)**4)+1)(The extra parentheses denote the entire mathematical operation as the single argument to print.)
In reply to Re: ** operator in perl
by chromatic
in thread ** operator in perl
by irah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |