This could be further simplified by using the special variable $. (INPUT_LINE_NUMBER) instead of $line_count:
open(F, "test.htm");
while(<F>) {
my @a = $_ =~ m{(http://hosting/image\d+\.jpg)}g;
for my $url (@a) {
print "URL [ $url ] found on line ($.)\n";
}
}
close(F);