I assume you expect this line
local $/ = "";
to change behavior
<DATA>
Continue reading until the end of the data.
But actually it takes something like this
{ local $/; # $/ becomes undef in this block ... }
to enable slurp mode (and enable this mode in the area inside {curlys}).
Essentially, he says: "Forget thinking of new lines as a marker for the end of a record,"
Besides ... there is a link fighter in your code!
while( <DATA> ) { print "\n-------------------------\n\n"; print; <>;
This little guy will read from STDIN, not from DATA - is this really what you want?
source share