We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e503249 commit ccb04d9Copy full SHA for ccb04d9
exercises/anagram/.meta/exercise-data.yaml
@@ -9,7 +9,14 @@ tests: |-
9
example: |-
10
sub match_anagrams {
11
my ($input) = @_;
12
- return [];
+
13
+ return [
14
+ grep {
15
+ lc $_ ne lc $input->{subject}
16
+ && join( '', sort( split( //, lc $_ ) ) ) eq
17
+ join( '', sort( split( //, lc $input->{subject} ) ) )
18
+ } @{ $input->{candidates} }
19
+ ];
20
}
21
22
stub: |-
exercises/anagram/.meta/solutions/Anagram.pm
@@ -6,7 +6,14 @@ our @EXPORT_OK = qw(match_anagrams);
6
7
8
1;
0 commit comments