- or download this
my $test = "foo bar";
print "Test is now: $test \n";
...
sub test {
$_[0] =~ s/foo/whatever/g;
}
- or download this
my @test_array = qw/foo bar test/;
print Dumper(@test_array);
test_array(\@test_array);
...
my $array_ref = $_[0];
$array_ref->[1] ="whatever";
}
- or download this
my %test_array;
$test_array{foo} = 1;
$test_array{bar} = 2;
...
my $array_ref = $_[0];
$array_ref->{foo} = "whatever";
}