playing with numbers and the operators who love them

This commit is contained in:
Dan Buch 2011-01-03 22:58:55 -05:00
parent 1cde2b3e18
commit aa0f8bb8cb

11
cli/numbers.pl Normal file
View File

@ -0,0 +1,11 @@
#!/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";