Is there any specific reason for using these low level IO functions (such as sysseek and sysread) where it seems to me that read would be simpler to use for what you want to do?
Update: changed the links to more recent Perl documentation. Thanks to kennethk.