I'd like to have a small perl script go through some files in a directory and in each file do the following, look for the first line and retrieve the time and code and then insert a line immediately after it with those two variables but in a specific format.
Before:
TIME=20100118095957980|EVNT=HELLO67|CODE=1234567891011121314151617|OTHERSTUFF
TIME=20100118095957980|EVNT=MICKEY|NAME=MOREOTHERSTUFF
After have it look like:
TIME=20100118095957980|EVNT=HELLO67|CODE=1234567891011121314151617|OTHERSTUFF
TIME=20100118095957980|EVNT=MINNIE|CODE=1234567891011121314151617
TIME=20100118095957980|EVNT=MICKEY|NAME=MOREOTHERSTUFF
Any ideas?
Thanks!
-Troy