in reply to Re^4: Replace value in the text file
in thread Replace value in the text file

Your code does not compile. Please do yourself a huge favor and  use warnings; and  use strict; at the start of every file. This is especially important for a novice Perler.

Even with strict and warnings, your code still has syntactic problems. The monks like to see working code, even if it does not do all (or even most) of what you want. Please see Short, Self-Contained, Correct Example.

Some syntactic thoughts:

Some best-practices thoughts:

These comments are dashed off quickly. Although it may seem that way, I don't mean to be blunt or dismissive. I hope you will take them as food for thought.


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^6: Replace value in the text file
by mhoang (Acolyte) on Jul 01, 2017 at 02:16 UTC

    Thanks for pointing out all the un-proper defined in my code. I will follow your recommendation to improve it.