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

Re: Indented here docs?

Thread Previous | Thread Next
From:
David Nicol
Date:
August 4, 2016 04:39
Subject:
Re: Indented here docs?
Message ID:
CAFwScO8L0gT==3Ukm2vXq0URyOtWAiRwrtUV33n5jQ2NX=SG_w@mail.gmail.com
I too think we should keep the initially proposed "<<~" syntax.

I would also like to again relate that I went for several years
thinking the warning I got when I attempted something like


  print << BAREWORD;
yabba dabba
BAREWORD

was telling me that it was using a bareword there that was deprecated,
rather than the space between the << and the delimiter. I always fixed
these things by putting quotes around the bareword, which worked
perfectly, as having put the quote there I no longer required any
space for visual normalcy, and remained oblivious to what was actually
happening.

It was only when I took it upon myself to submit a patch here that
would ** ALLOW SPACE BETWEEN THE << AND THE DELIMITER ** that I
discovered my error.


That patch only had effect on code where prefix << made sense, and
essentially did

        s/<<\s+([\w'"`\\])/<<$1/

there.

Uses such as << ; were not effected.


-- 
"It's like a whole other country."

Thread Previous | 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