in reply to Substitution of text within a file

does it have to be done in perl? you can do it with one substitution command in sed/vi/ex. you can even save this tiny command script and apply it again whenever you get such a file to mangle again.
in vi:
%s/\|\([0-9]\)/|+615\1/

Replies are listed 'Best First'.
Re: Re: Substitution of text within a file
by Anonymous Monk on Jun 07, 2003 at 01:06 UTC
    Tanx for ur replies.

    The point is that I can't use a command line to do it as the file contains another decimal fields, plus i've to run a test on the phone number before i add +615.

    I Just gave a simple file as an example.