Help for this page

Select Code to Download


  1. or download this
    my $text = <<TEXT;
    
    ...
    
    use Data::Dump qw(dump);
    print dump(\@answers);
    
  2. or download this
    (
      ["The Moor's Last Sigh", "Salman", "Rushdie"],
      ["The God of Small Things", "Arundhati", "Roy"],
    )
    
  3. or download this
    if ($text =~ /$re1/mgc) { ...
    if ($text =~ /$re2/mgc) { ...
    if ($text =~ /$re1/mgc) { ...
    if ($text =~ /$re2/mgc) { ...
    
  4. or download this
    # return ($1, $2, ...) matched against $s
    sub _groups {
    ...
        }
        return @groups
    }
    
  5. or download this
       push @answers, [ _groups($text) ]; # [ ($1, $2, ...) ]