#!/usr/bin/perl use warnings; use strict; my ($a, $b, $str); $a=3; $a = $a + 5; # without the binary assignment operator print "\n\n\n\$a=$a\n"; $a=3; $a += 5; # with the binary assignment operator print "\$a=$a\n"; $b=4; $b = $b * 3; # without the binary assignment operator print "\$b=$b\n"; $b=4; $b *= 3; # with the binary assignment operator print "\$b=$b\n"; $str = $str . " 1"; # append a space1 to $str print "\$str=$str\n"; $str .= " 1"; # same thing with assignment operator print "\$str=$str\n"; $a = 3; $b = ($a += 4); # $a and $b are both now 7 print "\$a=$a \$b=$b\n"; $a=2; $a **= 3; print "\$a=$a\n"; $a=2; $a = $a **3; print "\$a=$a\n";