#!/usr/bin/perl -w
use strict;

# Declare before use:
sub newsub;
sub another;
# Use:
# another(2, 3, 4 );
another(2, 3, 4 );
# Define:
sub newsub() {
    print @_;
    my $x=shift(@_);
    print "You passed me a value of " . $x . "\n";
    if (@_ > 0) {
	print "Hey, there are unused variables!\n";
    }
}

sub another() {
    # First method:
    for (@_) {
	print $_ . "\n";
    }
    # Second method:
    for (my $i=0; $i <= $#_; $i++) {
	print $_[$i] . "\n";
    }
}
