programming-examples/perl/_Basics/Demonstrates the difference between pre- and postincrement.pl

12 lines
186 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$c = 5;
$d = 5;
print $c, " ";
print $c++, " ";
print $c, "\n";
print $d, " ";
print ++$d, " ";
print $d, "\n";