print "How do I love thee? "; &let_me_count_the_ways; sub let_me_count_the_ways{ open (WAYS,"; my $count=0; foreach (@of_my_ways){ $count++; print "$count, $_\n"; } close WAYS; print "$count ways I love thee.\n"; }