in reply to efficiency & style
foreach (@tcpstatus) { while (/\b01\s/) { push(@tcpalive,$_); last; } } [download]
@tcpalive = grep { /\b01\s/ } @tcpstatus; [download]