#Read first record $nNumBytesRead = read(FInputFile, $Data, 1034); while($nNumBytesRead > 0) { #Reset Variables $nOffset = 0; @ItemList = (); #Read Frame-Sync @FrameSyncBytes = unpack("ccc",substr($Data,$nOffset,3)); $nOffset += 3; #Place text data into @ItemList using ReadStatic() ReadStatic(\@ItemList, \$nOffset, $U32, $U16, $Data, $SystemType); #Print static data to output spreadsheet file print FOutputFile ("\n",@ItemList); # Read next record $nNumBytesRead = read(FInputFile, $Data, 1034); }