Online Programming Reference Guides - Perl
[an error occurred while processing this directive]
Contents
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
[an error occurred while processing this directive]

2.4.3 Auto-Increment and Decrement

The auto-increment and auto-decrement operators in Perl work almost identically to the corresponding operators in C, C++, or Java. Here are few examples:

use strict; my $abc = 5; my $efg = $abc-- + 5; # $abc is now 4, but $efg is 10 my $hij = ++$efg - --$abc; # $efg is 11, $abc is 3, $hij is 8





[an error occurred while processing this directive]