in reply to Look Ahead/Behind Via a File Handle
Try SQL::Statement to parse your sql files.
After Compline,Zaxo