#!/usr/bin/perl =w use strict; #1137973 my $number=8; for(my $i=0; $i<3; $i++) { print "present value of \$i is $i and the number is: $number \n"; print " now printing \$number++: " . $number++ . "\n"; # NOTE OUTPUT! print "!! NOW, NOT EARLIER the post-increment occurs AFTER Ln 10\n"; print " and after post-increment, \$i is STILL $i but number is: $number\n\-----------\n"; } =head present value of $i is 0 and the number is: 8 now printing $number++: 8 # ie, unchanged! !! NOW, NOT EARLIER the post-increment occurs AFTER Ln 10 and after post-increment, $i is STILL 0 but number is: 9 ----------- present value of $i is 1 and the number is: 9 now printing $number++: 9 !! NOW, NOT EARLIER the post-increment occurs AFTER Ln 10 and after post-increment, $i is STILL 1 but number is: 10 ----------- present value of $i is 2 and the number is: 10 now printing $number++: 10 !! NOW, NOT EARLIER the post-increment occurs AFTER Ln 10 and after post-increment, $i is STILL 2 but number is: 11 ----------- =cut