• + 0 comments

    Perl:

    sub pangrams {
        my $s = shift;
        
        my %h;
        $s =~ s/\s+//gm;
        $s = lc($s);
        my @arr = split("", $s);
        %h = map {$_ => 1} grep {$_} @arr;
        return ((keys %h) == 26) ? "pangram" : "not pangram";
    }