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

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

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
March 5, 2016 19:07
Subject:
[perl #127640] RFE: "qqw( $var/x $var/y word3 $var4=word4 )"
Message ID:
rt-4.0.18-14802-1457204814-317.127640-15-0@perl.org
On Sat Mar 05 10:14:48 2016, perl.p5p@rjbs.manxome.org wrote:
> * Linda Walsh <perlbug-followup@perl.org> [2016-03-01T23:32:14]
> > Every once in a while, I start filling an array using
> > "qw()", when I run into, not too infrequently, a desire
> > to have a var or expression as a "word".  Paths can be
> > a good example:
> 
> $x = "good job";
> @y = qqw( $x hunter );
> 
> Is @y now ('good', 'job', 'hunter') or ('good job', 'hunter')?  I
> would think
> the latter.

I would have assumed the former.  So I suppose it’s not obvious.  BTW, this does the former:

  $x = "good job";
  @y = < $x hunter >;

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=127640

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