#!/usr/bin/perl -w ####################################################### # class4_02_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: 4-17-03 ####################################################### # 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 class4_02_subroutine2