= prime factorization in one line of perl = See also http://swoolley.org/blog.cgi/sieve%20of%20eratosthenes [code] perl -le '$e = 600851475143; $f = $e; for ($i = 2; $i < sqrt($f); $i++ ) { if ($e % $i == 0) { print $i; $e /= $i; exit() if $e == 1; }}' [/code] Not as good as some mentioned here: http://mathworld.wolfram.com/PrimeFactorizationAlgorithms.html