in reply to system() frustration
I notice your main foreach loop continues on after you've found the match. That's not the best idea (one you've got a hit, so to speak, break out of the loop with last).
A little more debugging info might help: you could print out the string you send to system before you make the call to system, to make sure it's executing the command you think it is.
A smaller note: you can use regex memory to get at the image URL, in one swell foop:
($newurl) = /img src="([^"]+)/i; # i.e. grab what's in between the quo +tes after the src= stuff
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
|
|---|