develooper Front page | perl.perl5.porters | Postings from September 2011

Re: [perl #93640] Allow comments in qw()

Thread Previous
From:
Eirik Berg Hanssen
Date:
September 19, 2011 02:37
Subject:
Re: [perl #93640] Allow comments in qw()
Message ID:
CAHAeAG6qeK2QzgH6iYSRtd0A7qvkOGQXLRO1hLt381ZA52zqsA@mail.gmail.com
On Mon, Sep 19, 2011 at 11:24 AM, Ed Avis <eda@waniasset.com> wrote:

> Peter Makholm <peter <at> makholm.net> writes:
>
> >>qw() is inconsistent with the rest of Perl which defines whitespace to
> >>include comments.
> >
> >Isn't it quite consisten with the default handling of # in all the other
> >quote like operators. Neither tr/// nor qx// have any special handling
> >making '#' used for comments.
>
> Neither does m//, but you can give the /x modifier to allow comments.
> So perhaps qw//x should be the syntax for a quoted word list with #
> comments
> stripped out.  That would be incompatible, though:
>
> % perl -E 'say qw/a b/x 2'
> abab
>


  ... and we're back to June 30th:


On Thu, Jun 30, 2011 at 11:00 PM, Eirik Berg Hanssen <ebhanssen@cpan.org>wrote:

> On Thu, Jun 30, 2011 at 10:55 PM, Ricardo Signes <
> perl.p5p@rjbs.manxome.org> wrote:
>
>> Are the two whitespace lines before # in the string itself?  This isn't a
>> problem in qw, where the whitespace is already gone.  Then again, it isn't
>> in
>> qx, either...
>>
>
>   qr// (&c) does not permit comments, but qr//x does.
>
>   Feature 'qw//x', anyone?
>
>
> Eirik, not sure if he's serious or not ...
>


Eirik, with a strange sense of déjà douté ...

Thread Previous


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