in reply to parsing textfile is too slow

Hi,
"use diagnostic;" makes your program slower.
Beside that, use -w flag. Then script will produce many warnings.