in reply to Problem in String Replacement

Without reading through your code (because I'm too tired right now), what happens when you try to step through the code from the command line? i.e. where does it fail.

For instance, you could step through it with debug, such as:

$ perl -d yourscript.pl

... and entering "n" to step through each line (and "s" to go into any sub-routines) ... and then you should see where it is having a problem.

Replies are listed 'Best First'.
Re^2: Problem in String Replacement
by Anonymous Monk on Oct 07, 2011 at 12:20 UTC

    Thanks, I'l try this..

    where does it fail. : Script goes in infinite loop..

Re^2: Problem in String Replacement
by tej (Scribe) on Oct 07, 2011 at 12:34 UTC
    Thanks Mortiz.. This really resolved my issue..