sub cpuchk() { my $SRVCHX = shift; message("Server Received is : $SRVCHX"); ----> Testing to check Server name passed from outside(good) message("host test : $HOSTNME"); ----> testing to check current hostname(good) if($SRVCHX eq $HOSTNME ) ------>Problem here - when both the values are same, it still does not execute if and goes to else { message("Local Server Selected, Executing commands locally.."); localcpucmds(); } else { message("Remote server selected: $SRVCHX"); . . Executes commands on remote server...