#!/usr/bin/perl -w

use strict;

#Another simple subroutine example.

print 'Enter your first name: ';
my $first = <STDIN>;
chomp $first;

print "\nEnter your last name: ";
my $last = <STDIN>;
chomp $last;

my $lastfirst = &reverseName($first, $last);
print "Your reversed name is $lastfirst \n";

sub reverseName
{
  return $_[1].$_[0];

}

=pod

=head1 NAME

example8 - An example perl script that includes perldoc docs.  Prompts for a first and last name and prints out the reversed name as a single string.

=head1 SYNOPSYS

example8 

=head1 DESCRIPTION

This toy script is an example of perldoc style documentation, use strict, and subroutines.

=head1 AUTHOR

Sharon Whiteman: whiteman@cs.wisc.edu
Written for the Grad Perl Seminar.

=cut
