develooper Front page | perl.perl5.porters | Postings from February 2016

Here-docs

Thread Next
From:
H.Merijn Brand
Date:
February 25, 2016 17:22
Subject:
Here-docs
Message ID:
20160225182156.1180762e@pc09.procura.nl

my $foo = <<"EOD";
1
2
EOD

works, fine!

my $foo = <<" EOD";
1
2
 EOD

works, fine!

my $foo = <<"	EOD";
1
2
	EOD

(that is twice a literal TAB character before EOD)

works, fine!

my $foo = <<"\tEOD";
1
2
	EOD

That is a literal TAB character before the trailing EOD

does NOT work!


IMHO that is rather inconsistent

This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux-thread-multi-ld

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.23   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About