Updated Home (markdown)
parent
568ce274af
commit
ef21b907c0
6
Home.md
6
Home.md
@ -9,11 +9,13 @@ Replace
|
|||||||
$res->{sensorsOutput}
|
$res->{sensorsOutput}
|
||||||
`
|
`
|
||||||
with
|
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`
|
`# Read JSON data from the file`
|
||||||
`open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";`
|
`open my $fh, '<', $json_file_path or die "Cannot open $json_file_path: $!";`
|
||||||
`my $json_text = do { local $/; <$fh> };`
|
`my $json_text = do { local $/; <$fh> };`
|
||||||
`close $fh;`
|
`close $fh;`
|
||||||
|
|
||||||
`$res->{sensorsOutput} = $json_text;`
|
`$res->{sensorsOutput} = $json_text;
|
||||||
|
`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user