Help for this page

Select Code to Download


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