in reply to Solve the large file size issue

  1. Please use a separate code block to post each datum or script.
  2. See answers in #1123214 for prior advice (like GrandFather's) AGAINST spawning another copy of Perl to do the substitution.
  3. If you don't know how to convert what appears to be a cargo-culted one-liner (s///) into line(s) of inline code, read perldoc perlretut and perldoc perlre at your console.
  4. What precisely happens after your code "only reach thousand line" (sic)? How do you know it doesn't|won't continue? What messages appear? Where (did you check your error logs?)

Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
  1. code
  2. verbatim error and/or warning messages
  3. a coherent explanation of what "doesn't work actually means.