Search and Replace with perl

Discussion in 'Perl Misc' started by Subra, Jun 6, 2007.

  1. Subra

    Subra Guest

    Hi,

    I have a file with entries like

    =======================================
    _RWSTD_VALUE_ALLOC(test1,
    test5);
    _RWSTD_VALUE_ALLOC(test1,snm);
    _RWSTD_VALUE_ALLOC(xyz,
    789);
    _RWSTD_VALUE_ALLOC(test1,sbk);
    _RWSTD_VALUE_ALLOC(abc,
    123);

    :
    ===============================

    I want to put 2nd argument to _RWSTD_VALUE_ALLOC as *this .
    So my resultant file should be
    =======================================
    _RWSTD_VALUE_ALLOC(test1,*this,
    test5);
    _RWSTD_VALUE_ALLOC(test1,snm);
    _RWSTD_VALUE_ALLOC(xyz,*this,
    789);
    _RWSTD_VALUE_ALLOC(test1,sbk);
    _RWSTD_VALUE_ALLOC(abc,*this,
    123);

    :
    ===============================

    Please help me to write this script....
    Subra, Jun 6, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Schif Schaf
    Replies:
    12
    Views:
    1,240
    Anthra Norell
    Feb 8, 2010
  2. Replies:
    0
    Views:
    88
  3. Replies:
    1
    Views:
    82
    J├╝rgen Exner
    Dec 17, 2004
  4. Replies:
    12
    Views:
    172
  5. Dominic Philsby

    search and replace in Perl

    Dominic Philsby, Jan 18, 2010, in forum: Perl Misc
    Replies:
    4
    Views:
    89
    Wanna-Be Sys Admin
    Jan 19, 2010
Loading...

Share This Page