aboutsummaryrefslogtreecommitdiff
path: root/challenge-041/javier-luque/perl5/ch-1.pl
blob: 5c30fdbad52b05ff278e918b6573823fab471bc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
# Test: ./ch-1.pl
use strict;
use warnings;
use Math::Prime::Util qw /factor is_prime/;
use feature qw /say/;

for my $i (1..50) {
    my @factors = factor($i);
    say $i if (is_prime(scalar(@factors)));
}