box-o-sand/PracticingPerl/cli/numbers.pl

12 lines
257 B
Perl
Raw Normal View History

#!/usr/bin/perl
my $a = 4;
print "\$a = $a\n";
print "\$a++ = " . $a++ . "\n";
print "++\$a = " . ++$a . "\n";
print "\$a-- = " . $a-- . "\n";
print "--\$a = " . --$a . "\n";
print "\$a += 5 = " . ($a += 5) . "\n";
print "\$a -= 2 = " . ($a -= 2) . "\n";