#!/usr/bin/perl -w

use strict;

sub scalar_pass {
	my ($value) = @_;
	$value .= " World";
	$_[0] .= " There\n";
}

my $var = "Hello";
scalar_pass($var);
print $var;
#scalar_pass("Hi");  # Error! Modification of a read-only value attempted

sub list_pass {
	my ($var, @list) = @_;
	print "$var (@list)\n";  # displays 1 (2 3 4 5) 
}

my @l = (3, 4, 5);
list_pass (1, 2, @l);
