Perl Weekly Challenge W022 - Sexy Primes
I was googling about perl, hoping to see an active community that is dedicated to perl. I have been an active member of codesignal and I primarily use perl to solve the challenges. And then, I came across the website perlweeklychallenge.org that is being maintained by Mohammad Anwar. The website as the name implies, post challenges every week it usually consist of three tasks.
Task #1 - Sexy Prime For this week, the first task is to print the first 10 sexy primesWrite a script to print first 10 Sexy Prime Pairs. Sexy primes are prime numbers that differ from each other by 6. For example, the numbers 5 and 11 are both sexy primes, because 11 - 5 = 6. The term “sexy prime” is a pun stemming from the Latin word for six: sex. For more information, please checkout wiki page.Solution #1
Below is my perl5 solution for the task:
Note: The code was intentionally obfuscated for fun (The syntax highlighter fails in
$'
)




