Please send questions to
st10@humboldt.edu .
#!/usr/bin/perl -w
#######################################################
# lect03_subroutine2
#
# first example of a subroutine/user-defined function,
# now calling it, also!
#
# modified by Sharon Tuttle from "Learning Perl",
# by Schartz and Phoenix
#
# last modified: 9-6-04
#######################################################
# I can call my subroutine earlier in the file:
print "about to make first call to my_first_subroutine:\n\n";
&my_first_subroutine;
# WHEN CALLED, just prints a message of success
sub my_first_subroutine
{
print "**************************\n";
print " MY FIRST PERL SUBROUTINE\n";
print "**************************\n";
}
# I can call my subroutine later in the file:
print "about to make second call to my_first_subroutine:\n\n";
&my_first_subroutine();
# end of lect03_subroutine2