Hope,this time I will make you clear.
Our script converts the original content to current output ,what we need is
the desired output.
*ORIGINAL CONTENT:*
<Field ID="*20000*">
<AttrSet ID="Core">
<integer ID="ZoneId" Value="999" />
<string ID="Name" Value="42_*L1*_Valid_Line_Indicator_*20000*" />
<boolean ID="LinkedCoord" Value="false" />
<integer ID="Type" Value="3" />
<integer ID="x" Value="0" />
<integer ID="y" Value="0" />
<integer ID="w" Value="10" />
<integer ID="h" Value="10" />
</AttrSet>
</Field>
*CURRENT OUTPUT:*
<Field ID="*20020*">
<AttrSet ID="Core">
<integer ID="ZoneId" Value="999" />
<string ID="Name" Value="42_*L2*_Valid_Line_Indicator_*20020*" />
<boolean ID="LinkedCoord" Value="false" />
<integer ID="Type" Value="3" />
<integer ID="x" Value="0" />
<integer ID="y" Value="0" />
<integer ID="w" Value="10" />
<integer ID="h" Value="10" />
</AttrSet>
</Field>
*DESIRED OUTPUT:*
<Field ID="*20980*">
<AttrSet ID="Core">
<integer ID="ZoneId" Value="999" />
<string ID="Name" Value="42_*L1000*_Valid_Line_Indicator_*20980*" />
<boolean ID="LinkedCoord" Value="false" />
<integer ID="Type" Value="3" />
<integer ID="x" Value="0" />
<integer ID="y" Value="0" />
<integer ID="w" Value="10" />
<integer ID="h" Value="10" />
</AttrSet>
</Field>
Thanks.....
On 2/12/10, John W. Krahn <[email protected]> wrote:
>
> elavazhagan perl wrote:
>
>> On 2/11/10, John W. Krahn <[email protected]> wrote:
>>
>>>
>>> elavazhagan perl wrote:
>>>
>>>>
>>>> I have a program which reads the input file,updates once and outputs in
>>>> a new file.
>>>> Ex.The first line L1 will be updated to L2.
>>>> I need to put this into a loop so that the scripts will be invoked 1000
>>>> times and the output contains the appended data(L1 TO L1000).
>>>> Please can you suggest few methods.
>>>>
>>>> It is not clear from your description or from your code exactly what you
>>> want to do. Do you want 1,000 separate files or one file with the data
>>> replicated 1,000 times or something else?
>>>
>>
>> I will try my best to make you clear.
>> Once we execute the script,it should generate the data for the 1000
>> lines.Now the script just converts the data for a single line
>>
>
> The data you provided has 156 "lines" in it. Do you consider all that data
> to be just one "line"?
>
> i.e Line1 will
>> be converted to line 2 and some increaments.
>> In order to get my desired data,I need to execute the script 1000
>> times,and
>> each output will be appended in a new file which will contain the whole
>> data.
>> I am trying to update the script so that for a single execution,it will
>> produce the whole data.
>> Hope I make it clear.Please let me know if any ambiguityon this.
>>
>
> What you want sounds easy enough to do. If you could just clear up what
> you mean by "line"?
>
>
>
>
> John
> --
> The programmer is fighting against the two most
> destructive forces in the universe: entropy and
> human stupidity. -- Damian Conway
>
> --
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> http://learn.perl.org/
>
>
>