I am getting an output from a subroutine as
@ outputarray
outputarray[0]=name ip port
outputarray[1]=------------------------------------
outputarray[2]=http-listener-1 * 6712
outputarray[3]=http-listener-2 * 4743
...... etc
I want to create a new file and write to file log.txt where file content looks as below and delete the file log.txt how can I achieve this in perl?
name ip port
------------------------------------
http-listener-1 * 6712
http-listener-2 * 4743
Thanks