Updated Home (markdown)
1 parent
568ce274af
commit
ef21b907c0
1 file changed
+4
-2
+4
-2
@@ -9,11 +9,13 @@ Replace
|
||||
$res->{sensorsOutput}
|
||||
`
|
||||
with
|
||||
` my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct and file has chmod 777`
|
||||
`
|
||||
my $json_file_path = '/tmp/sensordata.json'; # Ensure this path is correct and file has chmod 777`
|
||||
|
||||
`# Read JSON data from the file`
|
||||
`open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";`
|
||||
`my $json_text = do { local $/; <$fh> };`
|
||||
`close $fh;`
|
||||
|
||||
`$res->{sensorsOutput} = $json_text;`
|
||||
`$res->{sensorsOutput} = $json_text;
|
||||
`
|
||||
Reference in new issue
Block a user