Yes, you're going about it the wrong way. Read the thread; read the
tut; read the docs. Simply copying code won't teach you much (about which, more, below).
The dot in your regex stands for any character, whatsoever. That's not what you want.
And, * NOT * just BTW, the quantifier {0,10} makes no sense on several grounds.
- In valid (and useful) html, img alt="" src= will never be followed by zero characters.
- In most of the html I see, you can't count on getting the address link immediately after the alt description.
- Many webmonkies, me included, prefer to see the source address first (and don't usually leave the alternate description empty)
- Since you're apparently looking for the address of the image, you limit of 10 chars is unlikely to capture the whole address.
I suspect what you've done here is "cargo culted" some code you didn't understand. I understand that that's part of one style for learning, but it's dangerous if you don't study the code and the Perl documentation well enough to be sure you * DO * understand before using it.