You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
565 B
Perl
25 lines
565 B
Perl
|
|
#! /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";
|