Okay, let's say I have a text file, it's contents looking like this.
1|a
2|b
3|c
4|d
So, I get it into an array. Everything <- of the | is $var1, everything -> of the | is $var2. Now, let's say I want to update the second line. In another file, I have a variable containing 2, let's say. So, we've pinpointed that line. But now, what if I want to change the b in line 2 to something else, but leave the rest of the contents of the file. How can this be done?
Thanks.