Chris Snyder writes:
 > 
 > Dumb-ass answer:
 > 
 > print "Number to square: ";
 > $num = <STDIN>;
 > 
 > print $num ^ 2, "\n";
 > 
 > I haven't tested this, but you get the idea.

That operator is bit-wise exclusive or. I think the OP was looking for
exponentiation which is rather different (** operator BTW). For more
operator info see 'perldoc perlop'.

HTH

-- 
Brian Raven

So far we've managed to avoid turning Perl into APL.  :-)
             -- Larry Wall in <[EMAIL PROTECTED]>
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to