I read a file into an array like this:
open(HANDLE."<$filenamevar"
;
@arrayname = <HANDLE>;
close(HANDLE);
I need to search through the array for a certain string... I can do that no problem.
Then I need to insert new data after that without overwriting...
EXAMPLE:
an array with the following values
1
2
3
4
5
6
would become:
1
2
a
b
c
d
3
4
5
6
What would be my best approach?
open(HANDLE."<$filenamevar"
@arrayname = <HANDLE>;
close(HANDLE);
I need to search through the array for a certain string... I can do that no problem.
Then I need to insert new data after that without overwriting...
EXAMPLE:
an array with the following values
1
2
3
4
5
6
would become:
1
2
a
b
c
d
3
4
5
6
What would be my best approach?