Ash Varma wrote:
> Hi..
> 
> I have 2 files of data..
> 
> File 1 = id,name
> 
> eg:
> 
> 0001, J Smith
> 0002, J Smithers
> 0003 J Smith Thomas
> 
> 
> File 2 = general text, with names recorded at different locations..
> 
> eg.
> 
> This is random text for with J Smith, J Smithers and J Smith Thomas
> 
        What does your general data look like? Depending on how one can break 
out the data, might give insight on how to do the changes.

Wags ;)
> I am trying to replace all J Smiths with J Smith 0001 and J Smithers
> with J Smithers 0002, etc...
> 
> I cannot use:
> 
> for ($i=0;$i<=$#id;$i++) {
>     $randomtext =~ s/$name[$i]/$name[$i] $id[$i]/g
> }
> 
> This does not give the desired result... Gives names with dual IDs, or
> incorrect IDs..
> 
> Any hints on how I can solve this..
> 
> Thanks
> Ash



*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************

Reply via email to