#! /usr/bin/perl -w

## Compute the maximum value in a list
sub max {
    ## Put the paramters passed into an array of values
    my @values = @_;

    ## Initialize maximum value to first element
    my $max = $values[0];
    
    my $i;
    for ($i=1; $i <= $#values; $i++)
        {
        if ($values[$i] > $max) {
            $max = $values[$i];
            } 
        }
    return $max;
}

@ALPHABET= qw (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z);

@indices = qw(0 1 2 3 4 5);

#@b=reverse(@indices);

@c = @ALPHABET[reverse(@indices)];

print $c[0]. "\n";

$m = -2;

$y0 = max(abs($m),1,3);

print "Maximum value is ". $y0 ."\n";

print 5 - (-5) + 2 . "\n";

$n = 2;
print $n % 2 . "\n"; 

print ((-3 - -5)^(9) , "\n");
print ((-3 - -5)**(9) , "\n");
print ((-3 - -5)^(9/10) , "\n");
print ((-3 - -5)**(9/10) , "\n");

