Very nice signature! It's a prime number generator.
It doesn't run on Windows the way it is, though ... how about just adding the newline character $/, and doing:
X:for(my$x=1;;){$x%$_||next(X)for(2..$x++);print$x.$/}
If you want to make it even shorter, change print to warn:
X:for(my$x=1;;){$x%$_||next(X)for(2..$x++);warn$x.$/}
Of course, since it's not "production code", you can lose the my:
X:for($x=1;;){$x%$_||next(X)for(2..$x++);warn$x.$/}
And converting from for to map saves another character, so you're down to just 50 characters:
X:for($x=1;;){map{$x%$_||next X}2..$x++;warn$x.$/}
Update: Come to think of it, you don't need the label for next, and you can switch to the "map EXPR,LIST" form of map, to bring it down to 45 characters:
for($x=1;;){map$x%$_||next,2..$x++;warn$x.$/}
Update 2: From my response below, a better golf score (44 chars) can be achieved with:
$x++;{map$x%$_||redo,2..$x++;warn$x.$/;redo}
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
|