New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
possible "qw" bug #1108
Comments
From dan_liddell@mentorg.comPossible bug: $a = ("one", "two", "three"); $a = qw(one two three); Thanks! *********************************************** - Bertrand Russell |
From dan_liddell@mentorg.com#! /usr/bin/perl -w $a = ("one", "two", "three"); $a = qw(one two three); -- *********************************************** - Bertrand Russell |
From [Unknown Contact. See original ticket]
qw() is just shorthand for split ' ', q(); -- |
From [Unknown Contact. See original ticket]
% perl5.005_63 -le '$a = qw(one two three); print $a' --tom |
From [Unknown Contact. See original ticket]On Feb 1, Tom Christiansen said:
That change had better be documented. From 5.005_02's perlop.pod: qw/STRING/ split(' ', q/STRING/); This equivalency means that if used in scalar -- |
From [Unknown Contact. See original ticket]
Patches to perl{op,delta}.pod are, of course, everwelcome. --tom |
From [Unknown Contact. See original ticket]On Feb 1, Tom Christiansen said:
Patches to perl{op,delta}.pod will be, of course, written, when I'm told -- |
From [Unknown Contact. See original ticket]
From perldelta.pod: =head2 Improved C<qw//> operator The C<qw//> operator is now evaluated at compile time into a Thus: $foo = ($bar) = qw(a b c); print "$foo|$bar\n"; now correctly prints "3|a", instead of "2|a". And from perlop.pod: =item qw/STRING/ Evaluates to a list of the words extracted out of STRING, using split(' ', q/STRING/); the difference being that it generates a real list at compile qw(foo bar baz) is semantically equivalent to the list: 'foo', 'bar', 'baz' In summary, I believe that one would find that Sarathy has already --tom |
From @TimToadyDan Liddell writes: Nothing ever returns a list in scalar context, so there's no reason to Or maybe it should be join($", qw(one two three)). Larry |
From @TimToadyLarry Wall writes: Before you guys leap to the (probably justifiable) conclusion that I'm Actually, I'm just waiting for Unicode to take over so we can switch $a = «one two three»; Larry |
From [Unknown Contact. See original ticket]Larry Wall <larry@wall.org> writes:
For what it's worth, I like this idea, and can even see some use for it. -- |
From [Unknown Contact. See original ticket]From my own perspective there is a certain appeal to having qw(a b c) be Larry Wall wrote:
-- *********************************************** - Bertrand Russell |
From @TimToadyDan Liddell writes: Oh, I dunno. Perl is as much about religion as it is about mathematics, Larry : *********************************************** |
From [Unknown Contact. See original ticket]Larry Wall wrote:
How about Warning: I don't think that means what you think it means. Also, maybe the |
From @iabynJust reviewing old bugs from the Perl bug database:
This has been fixed in more recent releases of Perl, such 5.6.1 |
@iabyn - Status changed from 'stalled' to 'resolved' |
Migrated from rt.perl.org#2063 (status was 'resolved')
Searchable as RT2063$
The text was updated successfully, but these errors were encountered: