From 1746ecb6a0895b331f58b5ef861d2b7aaa74015f Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 18 Apr 2017 12:41:14 +0200 Subject: [PATCH] fix error by initial --- 82_LGTV_WebOS.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/82_LGTV_WebOS.pm b/82_LGTV_WebOS.pm index 81af356..bc94b52 100644 --- a/82_LGTV_WebOS.pm +++ b/82_LGTV_WebOS.pm @@ -1339,21 +1339,21 @@ sub LGTV_WebOS_Presence($) { my $hash = shift; - my $name = $hash-{NAME}; + my $name = $hash->{NAME}; my $temp; - $temp = qx(ping -c 1 -w 1 $hash->{$HOST} 2>&1); + $temp = qx(ping -c 1 -w 1 $hash->{HOST} 2>&1); if(defined($temp) and $temp ne "") { chomp $temp; Log3 $name, 5, "PRESENCE ($name) - ping command returned with output:\n$temp"; - $return (($temp =~ /\d+ [Bb]ytes (from|von)/ and not $temp =~ /[Uu]nreachable/) ? "present" : "absent"); + return (($temp =~ /\d+ [Bb]ytes (from|von)/ and not $temp =~ /[Uu]nreachable/) ? "present" : "absent"); } else { - $return 'Could not execute ping command'; + return 'Could not execute ping command'; } }