%[
#!/usr/interp/perl -w

# PERL VARIABLE INTERPOLATION EXAMPLE
# By Louis Ziantz

# Description: This program is a demonstration of scalar variable 
#             interpolation in Perl.
# Procedure:   A number of variables are used inside double-quoted
#             strings, and the results are printed.
# Input:       None
# Output:      Various messages using interpolated variables.

$num = 5;
$friend = "John Smith\n";
$month = "Octo";
print "$num\n"; # prints 5<newline>
print $friend;  # prints John Smith<newline>
print "Can I have \$$num?\n"; 
# prints  Can I have $5?<newline>
print "The month is $monthber.\n";
# prints The month is .<newline>
# because it thinks $monthber is a scalar variable
print "The month is ${month}ber.\n";
# prints The month is October.<newline>
print 'The month is ${month}ber.\n';
# prints The month is ${month}ber.\n
%]

