Welcome to the Monastery PerlMonks

by brusimm (Pilgrim)
 on Dec 21, 2006 at 18:16 UTC Need Help??

A big hearty Thanks out to everyone that helped me out with my Regular Expressions tutorial:
jdporter, gaal, ww, ysth, jonadab, hossman, tye, ww, Solo, Not_a_Number, muba & demerphq.
Especially jdporter for our conversations & his patience and the idea of this form of thanking everyone for taking the time to interact with my nodes.
if you're on this list, and you've suddenly found extra XP points one day, that's cause each day I'm blowing my votes on one of these members, .. my way of saying thanks.. for what that's worth. It's my morning ritual these days.

BELOW IS JUST A MIND GAME,
PAY IT NO HEED, but if you tinker and find it gives you 0 through 10, let me know! It's been noted it should not give consistent results across different OS's or computers.
```\$i = \$i++;               #
#print "\n";             # This is a noop.. effectively being 0.
print "Test   0 will equal: \$i\n";

\$i = 0;                          #
\$i = ++\$i;                       #
print "Test   1 will equal: \$i\n";         #  ++ adds 1, then \$i is lo
+oked at, and ++ added to it.

\$i = 0;                        #
\$i = \$i++ + ++\$i;              #
print "Test   2 will equal: \$i\n";

\$i = 0;
\$i = ++\$i + \$i++;              #
print "Test   3 will equal: \$i\n"; #

\$i = 0;                        #
\$i = ++\$i + ++\$i;              #
print "Test   4 will equal: \$i\n"; #

\$i = 0;                        #
\$i = ++\$i + \$i++ + \$i++;       #
print "Test   5 will equal: \$i\n";   #

\$i = 0;                        #
\$i = ++\$i + \$i++ + ++\$i;       #
print "Test   6 will equal: \$i\n";   #

\$i = 0;                        #
\$i = ++\$i + ++\$i + ++\$i;       #
print "Test   7 will equal: \$i\n";   #

\$i = 0;                          #
\$i = \$i++ + \$i++ + ++\$i + ++\$i ; #
print "Test   8 will equal: \$i\n";       #

\$i = 0;                          #
\$i = \$i++ + ++\$i + ++\$i + ++\$i ; #
print "Test   9 will equal: \$i\n";       #

\$i = 0;                          #
\$i = ++\$i + ++\$i + ++\$i + \$i++ ; #
print "Test  10 will equal: \$i\n";       #

print "\n";
TEST ZONE: Trying to be a good user!!
/node_id=595955
Perl Editors Win32

Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
As of 2017-10-21 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My fridge is mostly full of:

Results (271 votes). Check out past polls.

Notices?