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

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

Thread Previous | Thread Next
Ed Avis
September 19, 2011 02:24
Re: [perl #93640] Allow comments in qw()
Message ID:
Peter Makholm <peter <at>> 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'

Ed Avis <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About