I am writing a script in Perl, but Im just a beginner. This program downloads html page and tries to find phrases bounded by tags. I attached a code below, when I check it, there's no errors but it does nothing (no print out). So please can anybody give me some advice what can be wrong?
open ':std', ':encoding(UTF-8)';
my $s = get("xxx.html");
foreach my $line (split(/\n/,$s)) {
if (m,<>(.*?)<>,g) {
if(eof()) {
close(FILE); }
print "$1\n";
last if eof();
}
}