#! /usr/local/bin/perl
$a = 5;
print "\$a equals $a before the operation.\n ";
$a += 4.2;
print "The result of \$a += 4.2 is $a \n";
print "\$a equals $a before the operation.\n ";
$a -= 4.2;
print "The result of \$a -= 4.2 is $a \n";
print "\$a equals $a before the operation.\n ";
$a *= 4.2;
print "The result of \$a *= 4.2 is $a \n";
print "\$a equals $a before the operation.\n ";
$a /= 6;
print "The result of \$a /= 6 is $a \n";
print "\$a equals $a before the operation.\n ";
$a %= 6;
print "The result of \$a %= 6 is $a \n";
|