#!/usr/local/bin/perl 
#this script shows how to write functions of arbitrary many arguments
use warnings;

sub max {
  my ($maxvar)=shift(@_);
  foreach (@_) {
     if ($_ > $maxvar) {
         $maxvar=$_;
     }
  } 
  return $maxvar;
}


$i=max(1..10);
$j=max(2..4,-1..3);
print "$i \t $j\n";