Help for this page

Select Code to Download


  1. or download this
    my $test = "foo bar";
    
    print "Test is now: $test \n";
    ...
    sub test {
        $_[0] =~ s/foo/whatever/g;
    }
    
  2. 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";
    }
    
  3. or download this
    my %test_array;
    $test_array{foo} = 1;
    $test_array{bar} = 2;
    ...
        my $array_ref = $_[0];
        $array_ref->{foo} = "whatever";
    }