#!/usr/bin/perl -w

#######################################################
# class4_05_return2
#
# shows what my_first_subroutine, greeter actually return
# 
# modified by Sharon Tuttle from "Learning Perl",
#    by Schartz and Phoenix
#
# last modified: 4-17-03
#######################################################

#-------------------------------------------------
# WHEN CALLED, just prints a message of success
#-------------------------------------------------
sub my_first_subroutine
{
    print "**************************\n";
    print " MY FIRST PERL SUBROUTINE\n";
    print "**************************\n";
}

#--------------------------------------------------------
# prints a customer greeting that also counts customers
#--------------------------------------------------------
sub greeter
{
    $cust_num += 1;

    print "\n***** Welcome to Perl-mart! *****\n";
    print "Hello, you are customer #$cust_num today!\n";
    print "*********************************\n\n";
}

#-------------------------------------------------------
# script actually starts executing here
#-------------------------------------------------------

print "\nscript starts executing here!\n\n";

$val1 = &my_first_subroutine();

print "\nmy_first_subroutine returned: $val1\n";

$val2 = &greeter();

print "greeter returned: $val2\n\n";


# end of class4_05_return2
