$text =~ /extractor/ # i.e. match anywhere in the string #### $text =~ /\G extractor/gc # i.e. match at current pos in string #### use Text::Balanced ':ALL'; my $text = "this is a test for tags! \n"; my @data = extract_multiple( $text, [ \&extract_tagged ]); use Data::Dumper 'Dumper'; print Dumper [ @data ];