Tools4ever Port Ping Utility. Version 2.05 Copyright (c) 2002 Tools4ever bv. All rights reserved. www.tools4ever.com
Here is the perl codeHost: localhost Connection time: 985 ms Connected host: - Connected port: -1 Error code: 10061 Error text: Error 10061 connecting socket. No connection could be made + because t he target machine actively refused it.
I want the perl script to basically comma delimit host, connection time, ect. and to delete the first 3 lines of the outputmy(@PORTS); my($app); @PORTS= qx {C:\\t4ecltbundle\\T4ePortPing localhost 3232}; for(@PORTS){ ($KEY,$VAL)=split(/:/); $HOST=$SITVAL if $KEY =~ /Host/; $CONNTIME=$SITVAL if $KEY =~ /Connection time/; $CONNEDHOST=$SITVAL if $KEY =~ /Connected host/; $CONNEDPORT=$SITVAL if $KEY =~ /Connected port/; $ERRCODE=$SITVAL if $KEY =~ /Error code/; $ERRTEXT=$SITVAL if $KEY =~ /Error text/; } print "$HOST,$CONNTIME"; exit 0;
In reply to format output from a exe within a perl script by swartzieee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |