From f3233fb247099a6072397f13c007f22a9aa00826 Mon Sep 17 00:00:00 2001 From: Alan Hodgson Date: Wed, 16 Dec 2015 10:53:38 -0800 Subject: [PATCH] Fully specify hash reference to find $attribute. --- check_json.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_json.pl b/check_json.pl index abdb764..5d16d81 100755 --- a/check_json.pl +++ b/check_json.pl @@ -145,8 +145,8 @@ my $resultTmp; foreach my $attribute (sort keys %attributes){ my $check_value; - my $check_value_str = '$check_value = $json_response->'.$attribute; - + my $check_value_str = '$check_value = $json_response->{\'' . $attribute . '\'}'; + if ($np->opts->verbose) { (print Dumper ($check_value_str))}; eval $check_value_str;