in reply to Optimizing a script

Does it even print out the [DEBUG] messages? If not, then I'd suspect that there's something wrong (i.e. it's not processing your file at all). As far as perl is concerned, there is no difference between a small and a large file when you're reading a chunk at a time...

thor