#!/usr/bin/perl -w
############
# class demonstrations on Oct 7
##########

# swaps two arguments.
sub swap {
  my $temp = $_[0];
  $_[0] = $_[1];
  $_[1] = $temp;
}

my $one = 1;
my $two = 2;
print " one is $one, two is $two \n";

swap($one,$two);
print " one is $one, two is $two \n";
print "\n";

# What does this do?
my $one = 1;
my @list = ('red', 'blue', 'green');
my $two = 2;
my @answer = something( $one, @list, $two );
sub something {
  my ($first, @second, $third) = @_;
  print " \$first is '$first'.   \n";
  print " \@second is '@second'. \n";
  print " \$third is '$third'.   \n";
}
