Help for this page

Select Code to Download


  1. or download this
    my @in = qw(aaa bbb ccc);
    my @out = map { local $_ = $_; s/.$/x/; $_ } @in;
    print "@in\n=>\n@out\n";
    
  2. or download this
    my @out = map { (my $s = $_) =~ s/.$/x/; $s } @in;
    
  3. or download this
    my $_;
    
    # ...
    
    my @out = map { s/.$/x/; $_ } @in;