Example four - some scalar operations


#Example four - some interesting scalar operators.
# by Al Bento

$a = "this is example";
$b = 4;
$c = 3;
$d = 1;
++$c; # equivalent to $c = $c + 1
$e = !$d;       # it will create the null, empty value.
$f = $e + 0;
$g = " of concatenation";
$h = $a.$g;

# printing the variables.

print "$a number $b, the new value of c is also $c\n";
print "\n";
print "example of logical operators: $d, $e, and $f\n";
print "\n";
print "$h\n";

download the script


This page is maintained by Al Bento who can be reached at abento@ubmail.ubalt.edu. This page was last updated on June 15, 1997. Although we will attempt to keep this information accurate, we can not guarantee the accuracy of the information provided.