|
Hi,
I am new to perl programming and have a task at hand. I would be very thankful if anyone can help me solve the problem.
I have a file which has data in the format given below
abc.com, 2, 4, 5
xyz.com, 1, 2, 6
efg.net, 7, 3, 6
abc.com, 5, 3, 7
xyz.com, 1, 2, 1
efg.net, 3, 3, 2
abc.com, 2, 4, 5
xyz.com, 1, 2, 6
efg.net, 7, 3, 6
abc.com, 2, 4, 5
xyz.com, 1, 2, 6
efg.net, 7, 3, 6
Here the numbers after the urls (abc.com, xyz.com, efg.net) are ranks/positions of respective urls in bing, google, yahoo search engines when the script is run 4 times.
Now I need a code that reads the sample input file (please see attachment) and generates another file with the average of each url in the following format
abc.com, 2.75, 3.75, 5.5
xyz.com, 1, 2, 4.75
efg.net, 6, 3, 5
I need to carry out an important task based on the generated output and I have strict deadlines to meet.
Any help is appreciated..
Thanks in Advance,
Hardik
|
|
|
|
|