straight line floodfill SIMPLIFIED by tails

#!perl -p0
for(@s=index$_,".";$y=pop@s;){for$d(-1,1,($w=1-index$_,$"),-$w){$x=$y;$x+=$d,$r=46while${*r=\vec$_,$x+$d,8}-35;@$x=push@s,$x if!@$x}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page