http://www.perlmonks.org?node_id=1031593


in reply to Re^2: how to extract iframes from text
in thread how to extract iframes from text

Fair enough. This is actually easily fixable. You just have to replace a bit of code.

$string = readline TEST;

becomes

while ( <TEST> ) { chomp $_; $string .= $_ ; }

There. Now you've merged separate lines into a single string to search, and this works again. Happy?

Edit:Oh, and if you're still missing an ending iframe tag, you can see if that exists in your while loop condition text. Heck, you could probably tell the user where they're missing a iframe tag if you took that idea a little furhter.