What is the question?
Care to rephrase it in such a way that it does make sense? (Maybe it's just me not being a native English speaker, but I doubt that since I can make sense out of the vast majority of other posts...) | [reply] [Watch: Dir/Any] |
I was really perlplexed by this one:
print (2 + 2) * 5;
prints "4". Huh?
| [reply] [Watch: Dir/Any] [d/l] |
perl -MO=Deparse -e 'print (2 + 2) * 5'
print(4) * 5;
-e syntax OK
| [reply] [Watch: Dir/Any] [d/l] [select] |
DB<1> print (2+2)*5;
4
DB<2> print ((2+2)*5);
20
DB<3> print 3*5;
15
DB<4> $foo=(2+2)*5;
DB<5> x $foo
0 20
Well, I guess it's some side effect to do with print.
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
| [reply] [Watch: Dir/Any] [d/l] [select] |
P:\test>perl -wde1
perldb: Must not source insecure rcfile ./perldb.ini.
You or the superuser must be the owner, and it must not
be writable by anyone but its owner.
Loading DB routines from perl5db.pl version 1.25
Editor support available.
Enter h or `h h' for help, or `perldoc perldebug' for more help.
main::(-e:1): 1
DB<1> print (2+2)*5;;
4
DB<2> q
P:\test>perl -wle"print (2+2)*5"
print (...) interpreted as function at -e line 1.
Useless use of multiplication (*) in void context at -e line 1.
4
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
| [reply] [Watch: Dir/Any] [d/l] |
Warning. Don't try it. Or at least, use a throw-away email address. Before doing this quiz, I didn't get any spam at my gmail account. Now I'm getting small amounts. Annoying.
Bigfoot is setting up a dedicated development center in India for which they are looking for the finest Perl, Open Source programmers. The center would commence its operations in early Aug, 2005. Highlights of the opportunity with Bigfoot are: [...] A salary package that will be a trend setter in the industry.
I'm wondering what direction this trend is being set in... (a quick check on Bigfoot's webspace shows they're a New York company ... doing development in India, and want to pay people big bucks? Something smells fishy there..)
| [reply] [Watch: Dir/Any] |