in reply to Re^2: format output from a exe within a perl script
in thread format output from a exe within a perl script

I'm sorry if it wasn't clear, but I intended to keep the for loop and only replace the separate if statements with a single if/elsif/elsif/... statement, i.e.:
for (@PORTS) { ($KEY, $VAL) = split(/:/); if ($KEY =~ /Host/) { $HOST = $VAL; } elsif ($KEY =~ /Connection time/) { $CONNTIME = $VAL; } elsif ... }
Is that what you're referring to?

Replies are listed 'Best First'.
Re^4: format output from a exe within a perl script
by parv (Parson) on Apr 02, 2008 at 07:48 UTC
    Thanks for the clue bat. I missed to read your post carefully before my reply, namely I missed the creation of "KEY" in a loop.