Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- -1 ** 0 == -1 ???
January 5, 2009, 10:58 pm
rate this thread
I can't think of even the faintest justification for this:
% perl -le 'print( -1 ** 0 )'
Absolutely horrible! Perl just showed itself wholly unsuitable
for any programming that involves numerical computation...
Still in shock...
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
Re: -1 ** 0 == -1 ???
Turn on warnings to find out:
$ perl -wle 'print (-1)**0'
print (...) interpreted as function at -e line 1.
Useless use of exponentiation (**) in void context at -e line 1.
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
- » Autoflush and new/read-line not working as expected/documented?
- — Previous thread in » PERL Discussions