## WeBWorK Main Forum

### Caret and schtick

by Philip Loewen -
Number of replies: 2

I just got burned by typing the caret ("^") into a Perl formula when I wanted some exponentiation to happen. Since ^ is a legitimate binary operator, there is no error message ... just an unexpected result.

Figuring out what I had done wrong took hours, of course. But there was a silver lining: emotional engagement deepens one's learning.

To consolidate and commemorate this educational experience, I have turned it into a WW problem, which I hereby offer to the community.

### Re: Caret and schtick

by Davide Cervone -

Just an FYI, if your $two and $three had been MathObject Reals, rather than Perl reals, then $a =$two^\$three would have produced the error

    Can't use '^' with Real-valued operands (use '**' for exponentiation)