Help for this page

Select Code to Download


  1. or download this
    
    # let's define a sub that will return the matched id IF there was a ma
    +tch, undef else
    ...
    
    my @ids = grep { defined $_ } map { match_id($_) } @lines_from_file;
    
  2. or download this
    
    while ($file_content =~ m{dp/(.\d+?)}g) {  # we have to omit the \z
      print "Found one: $1\n";
    }
    
  3. or download this
    m{dp/([A-Z]\d{8})}g