Hi Scott,
I don't think my script is suffering from buffering. I think some issue with the CPAN library. I used IPC and created a child process, but for some reason the parent's request (heartbeat) isn't sent to the server, I think the child's read request is blocking the call. Which as per CPAN-SMPP library is expected. While child gets different offset, surprisingly it is an issue sometimes, not always. I'm thinking of emailing the module developer.
Thanks a bunch.