in reply to Re: Re: Efficiency issues in text parsing
in thread replacing text in specific tags

Your code does the magic. Thanks you very much

but one small doubt: what does "$var @e;" mean, particularly "@e", what does it mean here.

can you please suggest me some good perl book to handle this kind of stuffs.

once again, thanks a lot

Replies are listed 'Best First'.
Re: Re: Efficiency issues in text parsing
by CombatSquirrel (Hermit) on Aug 27, 2003 at 09:50 UTC
    The "@" is just the seperator for the RegEx which starts with "s@". The "e" is a modifier that specifies that the substitution part should be evaluated and the result be taken as the real substitute. And since the last line is always the return value, I just put $var as the last value, because it contains the substitue.
    Cheers,
    CombatSquirrel.
    Entropy is the tendency of everything going to hell.
      Hi, I am using

      $/="^Z";

      $*=1;

      for switching ON the multiline mode in my file while doing some regular expression find and replace.

      How to switch it OFF.

      Is it possible to ON and OFF the mode in the same script.

      please advice

        You might be looking for the /s modifier. Have a look at perlre.
        Cheers,
        CombatSquirrel.
        Entropy is the tendency of everything going to hell.