Read data from csv file with pipe separated values in one column

I have a CSV file with two columns: server, port which has its data with the pipe as a delimiter

Server,port

Server1|server2,port1|port2

I want to read the values from the CSV file in the below combination and store them in two different variables. There might be more number of servers or ports in future so I need to add a loop to check the combinations

server1,port1

server2,port2

SAMPLE ASSIGNMENT
Powered by WordPress