develooper Front page | perl.perl6.language | Postings from August 2000

Pre-RFC: Require a warning on spaces after here-document "terminator"

Thread Previous | Thread Next
From:
Ariel Scolnicov
Date:
August 20, 2000 22:18
Subject:
Pre-RFC: Require a warning on spaces after here-document "terminator"
Message ID:
yzqhf8f6vl5.fsf@compugen.co.il

I was asked to debug a weird Perl5 problem yesterday.  The code in
question looked roughly like this (indented 4 spaces, but otherwise
unchanged):

    #!perl -w
    use strict;
    
    print <<END;
    The next line contains a space at the end.
    END 
    This is still a here document
    END

This can be very hard to discover. I find it hard to see myself doing
this on purpose.  I would like to see a compiler warning for this:
"Spaces detected after apparent here document terminator", but
preferably phrased better.

Are there any objections?

-- 
Ariel Scolnicov        |"GCAAGAATTGAACTGTAG"            | ariels@compugen.co.il
Compugen Ltd.          |Tel: +972-2-6795059 (Jerusalem)	\ We recycle all our Hz
72 Pinhas Rosen St.    |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555    http://3w.compugen.co.il/~ariels

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