Help— perl neighbor pair search?

tian

New member
0

I have a file called 1.txt with the format for each line is like route+node i.e 190.227.163.142to190.227.163.142asn7303 7303 the 1st column is the route and the 2nd column will be a specific node number which is unique for one route. I wanner use perl script to generate another file called “2.txt”. It should count the neighbor for each node i.e the one after the node and the one before the node and print them out. In other words, a consisting of 1 2 3 I need to produce the output like:

1 2

2 1

2 3

3 2
 
Back
Top