in reply to Extract from text file
The problem is with the http links from the block content. Your block is from // to //, but 'http://' contains double slash too, so there is your premature end of block.
The fix will be to change $/ to:
$/ = "//\n";