Help for this page

Select Code to Download


  1. or download this
        $string !~ s/\d{10}//g;
  2. or download this
    if ($string !~ s/\d{10}//g) {
       print "String unchanged: couldn't find 10 digits.\n";
       # do stuff to deal with regex failure
    ...
    else {
       print "All cases of 10 digits have been deleted.\n";
    }
    
  3. or download this
    if (not $string =~ s/\d{10}//g) {
    unless ($string =~ s/\d{10}//g) {