Help for this page

Select Code to Download


  1. or download this
    use strict;
    my $str = "abc dddd     10 ";
    ...
    else {
      # do something with unexpected record
    }
    
  2. or download this
    if ($str =~ /^(\w+\s+){2,3}(\d+)/) {
      $number = $2;
    }