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
From:
Ricardo Signes
Date:
March 11, 2016 14:35
Subject:
Re: [perl #127640] RFE: "qqw( $var/x $var/y word3 $var4=word4 )"
Message ID:
20160311143448.GA30547@debian
* Father Chrysostomos via RT <perlbug-followup@perl.org> [2016-03-11T00:52:04]
> On Thu Mar 10 16:01:19 2016, perl.p5p@rjbs.manxome.org wrote:
> > @x = qqw(  x:abc x:@def x:ghi  );
> > 
> > It would be bizarre for the second example to only have x: on the first
> > element from @def.  If @def is empty, it ought to become "", similarly.
> 
> Would you please clarify with examples? Does x:@def above become one element
> of @x, or does it fill @x with as many elements as are in @def?

I mean that, given @def=(1,2,3), @x would be:

  ("x:abc", "x:1 2 3", "x:ghi")

> 
> That said, I wish we could solve this kind of nonsense:
> 
>   qq<$x{">"}>;  # syntax error
> [...] 
> Would it be possible to make qqw work the ‘new’ way?  Or would it be to
> confusing if it does not conform to the way qw works?
> 

I think it would be too confusing. :(

-- 
rjbs

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