Hi,
I have this snippet. I basically just wants to read the content of __DATA__. But for some strange reason, sometimes it works and sometimes it doesn't because $_ seems to be picking up old values. I'm not sure why it should be doing this.
Or is there a better way to write this snippet?
use strict;
my $test = qq();
$test = $test . $_ while (<DATA>);
print "$test";
__DATA__
Hello there.
This is me.