I am trying to use the filehandle DATA in a script, assign the values to a variable, and when it prints it just prints and empty string.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper qw(Dumper);
my $str = <DATA> ;
print "$str\n" ;
__DATA__
ab cd ef gh ij