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

12 lines
186 B
Perl
Raw Normal View History

2019-11-18 14:44:36 +01:00
$c = 5;
$d = 5;
print $c, " ";
print $c++, " ";
print $c, "\n";
print $d, " ";
print ++$d, " ";
print $d, "\n";