Next | The Identity Function | 10 |

This works:

@square = (0,1,4,9,16,25,36,49); print "3 squared is = $square[3]\n";

So does this:

print "3 squared is = $square[sqrt(4+2*6)-int(3/2)]\n";

Arbitrary expressions

*are*evaluated in double-quoted strings......when they are inside of array or hash subscripts

Next | Copyright © 2001 M. J. Dominus |