sub is_prime{map{$n=$n%$_?$n:0}2..($n=pop)**.5;$n>1}
i have no idea why that &&1 was in there... that's what happens when i write code after being awake for over 70 hours...