in reply to Re: speeding up script that uses filehandles
in thread speeding up script that uses filehandles

Off-topic from the original question, but whenever you do print sprintf, you should think about just using printf directly. I think this is clearer:

while (<$hndl>) { printf "%7d %s\n", $., $_; }