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

Re: [perl #127640] RFE: "qqw( $var/x $var/y word3 $var4=word4 )"

Thread Previous | Thread Next
Kent Fredric
March 6, 2016 09:41
Re: [perl #127640] RFE: "qqw( $var/x $var/y word3 $var4=word4 )"
Message ID:
On 6 March 2016 at 22:18, Aristotle Pagaltzis <> wrote:
> There’s little point in adding yet another way of writing that, when the
> other kind of result incurs a per-item punctuation tax:
>     (
>         "$prefix/foo",
>         "$prefix/bar",
>         "$prefix/baz",
>         "$prefix/quux",
>         "$prefix/qux",
>         # ...
>     );
> (And that’s the least noisy way of formatting it.)
> So that is the case that ought to gain some syntactic relief, if any.
> Hope I did a better job this time.

Agreed, so we are both proponents of "preserving"-qqw.

> preserving-qqw:  variables with spaces in them are treated as
> syntactically atomic and indivisible, and any spaces in them are
> treated as non-spaces for the purpose of the qqw construct, and only
>literal spaces in qqw itself is a separator

The only residual question I have is, what does this do:

@x = ('word','word with space');
@z = qqw(   @x  not-touching @{x}touching );

I assume that the "most obvious" thing would be this to compile the same as:

@z = (



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