in reply to Perl slower than java

Christian888:

I haven't analyzed your code in any depth (time constraints, lack of sleep, too many interactions with global variables). But it does appear that you're not taking advantage of some of the advantages of perl to get things going a bit faster.

A couple random notes:

...roboticus

When your only tool is a hammer, all problems look like your thumb.