while( $sz > 32760 ) { print $FH substr($m, pos($m), 32760); pos($m) += 32760; $sz -= 32760; } print $FH substr($m, pos($m), $sz); pos($m) += $sz;