Exercise: Write a test to test the Anagram checker
- Anagrams are words with the exact same letter, but in different order.
- silent - listen
examples/test-simple/lib/MyAnagram.pm
package MyAnagram; use strict; use warnings; use Exporter qw(import); our @EXPORT_OK = qw(is_anagram); sub is_anagram { my ($x, $y) = @_; my $xx = join('', sort(split(//, $x))); my $yy = join('', sort(split(//, $y))); return $xx eq $yy; } 1;