Re: Modify a line after occurance of a specific word?

2006-08-02 Thread The Other1
John said: This appears to do what you want: [SNIP] Rob said: This problem interested me and here is my offer of an alternative solution to John's, which works in normal line input mode instead of paragraph mode. Take your pick! [SNIP] WOW! Thanks guys. Nice coding on both parts. I gues

Modify a line after occurance of a specific word?

2006-08-01 Thread The Other1
Hi list, I process a set of files and end up with a hash with server, administrator pairs. I need to read in another file and modify (or add if it does not exist) a line containing the word administrator following the line with the server name. Hash pairs: Server1 Bob Server2 Chuck Server3

Average from array of arrays

2006-04-21 Thread The Other1
Hi all, Sorta newbie here... I have parsed log files and have an array of arrays that looks like this: [...] 1 0.0 0.000 31.954 36.169 12.645 20:40 16 1048.0 16.196 15.825 52.502 5.150 20:40 8 1281.7 12.059 9.634 41.264 4.869 20:40 9 1157.7 19.094 16.889 52.218 4.742 20:40 0 0.0 0.000 76.430 10