in reply to Code running perfectly fine in a Linux machine throwing errors whn run on windows

Line 118 is

if ($temp[4] ne '=0'){
so obviously $temp[4] is not set. You set it depending on
if ($_ =~ /^(\@pRECTYPE=\"SBSB\")(.*)(\@pWMDS_SEQ_NO)(1)(=\d{1})(.*)(\ +@pWMDS_SEQ_NO)(2)(=\d{1})(.*) .....
in line 95. So you should investigate why the regex is no longer matching. Probably some encoding issue between the Linux and Windows version of <UPDFILE>...

HTH, Rata