my @array; my $i=0; my $Radio_string =""; # Need to launch RTLAMR and read the strings coming out. # Can pre-filter to just MY meter on the commandline with: # cd ~/go/bin # ./rtlamr -msgtype=scm+ --format=json -filterid=101419821, 101419999 +-unique=false # Launch the radio system("/home/jj/go/bin/rtlamr -msgtype=scm+ --format=json -filterid=1 +01419821,101419999 -unique=false"); # slurp the headers do { $Radio_string = $_; Print $i; Print $Radio_string; $i++; } until $i == 10; Print("\n-------End of headers.--------\n\n"); # now wait for and process usage reports #@array = json(system("/home/jj/go/bin/rtlamr -msgtype=scm+ --format=j +son -filterid=101419821,101419999 -unique=false")); $Radio_string = $_; Print $Radio_string; @array = json($Radio_string); Dump(@array);