$ cat pm_1185726_heredoc_pod.pl
my $str = <<=cut;
=head2 Some documentation
=cut
$
####
$ perl -MO=Deparse pm_1185726_heredoc_pod.pl
Use of bare << to mean <<"" is deprecated. Its use will be fatal in Perl 5.28 at pm_1185726_heredoc_pod.pl line 1.
Can't modify scalar in scalar assignment at pm_1185726_heredoc_pod.pl line 1, near "cut;"
pm_1185726_heredoc_pod.pl had compilation errors.
my $str = "" = 'cut';
$
####
$ perl -MO=Deparse pm_1185726_heredoc_pod.pl
my $str = "\n=head2 Some documentation\n\n";
pm_1185726_heredoc_pod.pl syntax OK
####
$ cat pm_1185726_heredoc_pod.pl
our $VERSION = '1.234';
my $str = <<"=cut";
=head2 Some documentation
Doco for version: $VERSION
=cut
print $str;
####
$ perldoc pm_1185726_heredoc_pod.pl
####
$ perl -wMstrict pm_1185726_heredoc_pod.pl
=head2 Some documentation
Doco for version: 1.234