Help for this page

Select Code to Download


  1. or download this
    use List::MoreUtils qw(indexes);
    my $a = '0157953';
    ...
    substr $new, $_, 0, 'I' foreach ( indexes { $_ =~ /^[yz]$/ }
                                      split(//, $b) );
    print $new, "\n";
    
  2. or download this
    substr $new, pos($b)-1, 0, 'I' while ( $b =~ /[yz]/g );