in reply to limit output filesize

i'm anything but an expert, but I would likely go for a solution where I used a single scalar to keep track of how many bytes were already written, and before each write check if ($bytes_written + $current_line) > 51200. If that's the case, hang on to $currentline for the moment, close the file I was writing to nice and tidy and open the next one. Might be tedious, but it's simple :-) Not sure how efficient it would be though.


Remember rule one...