$ perl -e 'my $var = 5; my $res= $var--; print $res' $ 5 $ perl my $var = 5; my $counter = 0; for ( my $i = $counter; $var--; 1 ) { print ++$counter; } 12345 $ perl -E 'my $var = 1; say "yes" if $var--' yes $ perl -E 'my $var = 0; say "yes" if $var--' $