in reply to how to use fgets to Break file into individual records
Have you looked at Text::CSV_XS? Alternatively, if you're hell-bent on rolling your own, see split.