Re: Insert value in existing record

2006-05-18 Thread Tom Phoenix
On 5/18/06, Gerald Wheeler [EMAIL PROTECTED] wrote: Wondering how I can insert a value: abc| w/o the quotes) immediately after the third | (pipe character) in file xyz.txt. There's more than one way to do it. One way would be a substitution (s///). Another would be to use split and join:

RE: Insert value in existing record

2006-05-18 Thread Saboo, Nandakishore
Hi, As Tom Phoenix said there are many ways to do it, this is one of the way we can do it. +++ $string = one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|; $added = abc|; @tmp_array = split(/\|/,$string,4); for ($i=0;$i$#tmp_array;$i++) {

Re: Insert value in existing record

2006-05-18 Thread John W. Krahn
Saboo, Nandakishore wrote: Hi, Hello, As Tom Phoenix said there are many ways to do it, this is one of the way we can do it. +++ $string = one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|; $added = abc|; @tmp_array =