Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    $counter = 1;
    print "With \$counter++ was 1 and returns ", $counter++, "\n";
    print "\$counter now contains: $counter\n";
    
  2. or download this
    With ++$counter was 1 and returns 2
    $counter now contains: 2
    
    With $counter++ was 1 and returns 1
    $counter now contains: 2