I have a data file that looks like this:
PATH Trial CTR LAT CTR LON
1 1 80.774791 3.21062
1 2 80.021757 -4.274059
1 3 79.129883 -10.647337
1 4 78.130377 -16.029408
1 5 77.048078 -20.572231
2 6 75.901981 -24.423146
2 7 74.706362 -27.710197
2 8 73.4719 -30.538982
2 9 72.20661 -32.99444
2 10 70.916558 -35.14418
3 11 69.606373 -37.041893
3 12 68.279631 -38.730311
3 13 66.939121 -40.243615
3 14 65.587044 -41.609314
3 15 64.225153 -42.849707
4 16 62.854858 -43.982999
4 17 61.477307 -45.024165
4 18 60.093439 -45.985606
4 19 58.704028 -46.877669
4 20 57.309721 -47.709041
5 21 55.911059 -48.487062
5 22 54.5085 -49.217972
5 23 53.102434 -49.907108
5 24 51.693192 -50.559055
5 25 50.281063 -51.177779
6 26 48.866293 -51.76672
6 27 47.449102 -52.328882
6 28 46.029677 -52.866897
6 29 44.608187 -53.383082
And the "PATH" value continues up to 195. What I need to do is take this data and rearrange it such that the path and its corresponding data to the right of it is in this order:
3
3
3
3
3
19
19
19
19
19
35
35
35
35
35
51
51
51
51
51
(continue to increment by 16)
195
195
195
195
195
I'm only a beginner and very new to Perl scripting, so any help is greatly appreciated. Thanks
PATH Trial CTR LAT CTR LON
1 1 80.774791 3.21062
1 2 80.021757 -4.274059
1 3 79.129883 -10.647337
1 4 78.130377 -16.029408
1 5 77.048078 -20.572231
2 6 75.901981 -24.423146
2 7 74.706362 -27.710197
2 8 73.4719 -30.538982
2 9 72.20661 -32.99444
2 10 70.916558 -35.14418
3 11 69.606373 -37.041893
3 12 68.279631 -38.730311
3 13 66.939121 -40.243615
3 14 65.587044 -41.609314
3 15 64.225153 -42.849707
4 16 62.854858 -43.982999
4 17 61.477307 -45.024165
4 18 60.093439 -45.985606
4 19 58.704028 -46.877669
4 20 57.309721 -47.709041
5 21 55.911059 -48.487062
5 22 54.5085 -49.217972
5 23 53.102434 -49.907108
5 24 51.693192 -50.559055
5 25 50.281063 -51.177779
6 26 48.866293 -51.76672
6 27 47.449102 -52.328882
6 28 46.029677 -52.866897
6 29 44.608187 -53.383082
And the "PATH" value continues up to 195. What I need to do is take this data and rearrange it such that the path and its corresponding data to the right of it is in this order:
3
3
3
3
3
19
19
19
19
19
35
35
35
35
35
51
51
51
51
51
(continue to increment by 16)
195
195
195
195
195
I'm only a beginner and very new to Perl scripting, so any help is greatly appreciated. Thanks