in reply to Re: perl script for adding information to c file.
in thread perl script for adding information to c file.

Hi choroba, Its working but i have one problem with this script, it adding information how many times sting found in c file. But i need to add only once.for example if temperature string found three times in c file, so it adding same information three times. if string found add information at once is enoghf. no need to add same information so many times(how many times string presents).because in my file i have repeated strings so its aadding same information several times. how can i rectify this.

  • Comment on Re^2: perl script for adding information to c file.

Replies are listed 'Best First'.
Re^3: perl script for adding information to c file.
by Anonymous Monk on Oct 10, 2011 at 12:04 UTC

    how can i rectify this.

    Modify program to use hash "%seen" to keep track of substitutions already made

    See perlfaq6

      Hi, if u dont mind can you tel how can i use that function in my code. because i read that you sended link but i cant found any such function, how to use that function.

        Are you here to learn or to hire a programmer?