Help for this page

Select Code to Download


  1. or download this
    use List::MoreUtils qw/before after/;
    
    my $string = 'mystring123456';
    $string = join '', (before {$_ eq 1} split //, $string), after {$_ eq 
    +1} split //, $string;
    
  2. or download this
    my $string = 'mystring123456';
    $string = join '',  split /1/, $string, 2;