Here is a fully working example:

Break ON
$=SetOption("Explicit","ON")


Dim $iStartLine,$iLineCount,$sLine


$iStartLine=5


For Each $sLine in Split(udfPipe("netstat")[0],@CRLF)
$sLine=udfSqueeze($sLine)
$iLineCount=$iLineCount+1
If $iLineCount>=$iStartLine AND $sLIne
$sLine=Split($sLine)
@CRLF+"INPUT LINE # "+$iLineCount+@CRLF
" Field 0 is Proto : "+$sLine[0]+@CRLF
" Field 1 is Local Address : "+$sLine[1]+@CRLF
" Host="+Split($sLine[1],":")[0]+", port="+Split($sLine[1],":")[1]+@CRLF
" Field 2 is Foreign Address : "+$sLine[2]+@CRLF
" Host="+Split($sLine[2],":")[0]+", port="+Split($sLine[2],":")[1]+@CRLF
" Field 4 is State : "+$sLine[3]+@CRLF
EndIf
Next


Function udfPipe($sCommand, Optional $iTimeout,Optional $iInterval) ; {{{
; Execute a command and return output and error streams
; This code adapted from Chris S. WshPipe() http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=8257
Dim $oExec
Redim $udfPipe[2]


If Not $iTimeout $iTimeout=10.0 EndIf
If Not $iInterval $iInterval=0.1 EndIf
$iTimeout=CDbl($iTimeout)
$iInterval=CDbl($iInterval)


$oExec = CreateObject("WScript.Shell").Exec($sCommand)
If Not VarType($oExec)=9 $udfPipe[1]=@SERROR Exit @ERROR EndIf


; Wait for process to complete to ensure correct exit status is returned
While $oExec.Status=0 And $iTimeout > 0
Sleep $iInterval
$iTimeout=$iTimeout-$iInterval
Loop


If Not ($iTimeOut>0) $udfPipe[1]=$udfPipe[1]+@CRLF+"TIMER EXPIRED" Exit 1460 EndIf


$udfPipe[0] = $oExec.StdOut.ReadAll
$udfPipe[1] = $oExec.StdErr.ReadAll


Exit $oExec.ExitCode
EndFunction ;}}}
Function udfSqueeze($s) ;{{{
While InStr($s," ") $s=Join(Split($s," ")) Loop
$udfSqueeze=Trim($s)
Exit 0
EndFunction ;}}}
; vim: ai sw=4 ts=4 fdm=marker fdc=4



Output looks like this:
INPUT LINE # 5
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:1183
Host=xxxxxxxxxx10175, port=1183
Field 2 is Foreign Address : zzzzzlhdfl001.harsco.com:microsoft-ds
Host=zzzzzlhdfl001.harsco.com, port=microsoft-ds
Field 4 is State : ESTABLISHED


INPUT LINE # 6
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:1209
Host=xxxxxxxxxx10175, port=1209
Field 2 is Foreign Address : 999.999.0.43:1025
Host=999.999.0.43, port=1025
Field 4 is State : ESTABLISHED


INPUT LINE # 7
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:1213
Host=xxxxxxxxxx10175, port=1213
Field 2 is Foreign Address : mail.multiserv.com:5022
Host=mail.multiserv.com, port=5022
Field 4 is State : ESTABLISHED


INPUT LINE # 8
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:1677
Host=xxxxxxxxxx10175, port=1677
Field 2 is Foreign Address : yyyyyyyyws015.harsco.com:netbios-ssn
Host=yyyyyyyyws015.harsco.com, port=netbios-ssn
Field 4 is State : ESTABLISHED


INPUT LINE # 9
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:2107
Host=xxxxxxxxxx10175, port=2107
Field 2 is Foreign Address : 999.999.96.131:3502
Host=999.999.96.131, port=3502
Field 4 is State : TIME_WAIT


INPUT LINE # 10
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:2110
Host=xxxxxxxxxx10175, port=2110
Field 2 is Foreign Address : 999.999.96.131:3502
Host=999.999.96.131, port=3502
Field 4 is State : TIME_WAIT


INPUT LINE # 11
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:2111
Host=xxxxxxxxxx10175, port=2111
Field 2 is Foreign Address : 999.999.96.131:3502
Host=999.999.96.131, port=3502
Field 4 is State : TIME_WAIT


INPUT LINE # 12
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:1190
Host=xxxxxxxxxx10175, port=1190
Field 2 is Foreign Address : localhost:6139
Host=localhost, port=6139
Field 4 is State : ESTABLISHED


INPUT LINE # 13
Field 0 is Proto : TCP
Field 1 is Local Address : xxxxxxxxxx10175:6139
Host=xxxxxxxxxx10175, port=6139
Field 2 is Foreign Address : localhost:1190
Host=localhost, port=1190
Field 4 is State : ESTABLISHED