ok i'll try , detailed possible.
i need connect https url streams json data, , search keywords via regex data streams take matching json element decode , insert database.
the regex on not problem that's relatively simple.
what i'm struggling reading data line wise. i've tried few examples found online use lwp stream never stops loading script hangs.
here's closest i've gotten
#!/usr/bin/perl use strict; use warnings; use lwp::simple; use io::string; $handle = io::string->new(get("https://stackoverflow.com")); while (defined (my $line = <$handle>)) { print $line; #inserted testing #decode , insert db here } close $handle;
the data comes in fast rate script has efficient.
any pointers how done great.
thanks sean
json::sl can you.
also see chas. owens' answer compares json::sl , json::streaming::reader.
Comments
Post a Comment