in reply to Question regarding web scraping
while ($CONTENT =~ <div class=\"usertext-body may-blank-within md-cont +ainer \"><div class=\"md\">(.+?)<\/div> <\/div><\/form><ul class=\"flat-list buttons\"> //gs )
This line gives an error. The thing to the right side of the =~ should be a match (a regular expression) but it is not. Perhaps move one of the terminating slashes to the beginning of the expression instead of having 2 at the end.
Addendum: This line:
open(OUT, "">C:/Users/user/perl_tests/reddittest.txt");
is also badly formed. See open for examples of how to call this function correctly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question regarding web scraping
by Lisa1993 (Acolyte) on Oct 22, 2016 at 15:27 UTC |