Help for this page

Select Code to Download


  1. or download this
    my @array = (1, 2, 3, 4, 5);
    my @adjusted_array = map { $_ * 10 } @array;
    print (join ',', @adjusted_array);
    
  2. or download this
    my @array = ('one-1', 'two-2', 'three-3', 'four-4', 'five-5');
    my %hash = map { split /-/ } @array;
    print (join ',', keys %hash);
    
  3. or download this
    if ($access) {
        foreach (@{$access}) {
            $set{$_->[0]} = $_->[1];
        }
    }