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
given (@a) when (/REGEX/) #10505
Comments
From @ikegamiCreated by @ikegamiperlsyn indicates that "when (/REGEX/)" is treated as "when ($_ =~ /REGEX/)" ------ BEGIN EXAMPLE ----- my @a = qw(abc def); if (@a ~~ /abc/ ) { say '/abc/'; } # Matches say '--'; given (@a) { say '--'; given ($a[0]) { ------ BEGIN OUTPUT ----- Perl Info
|
From @obraConfirmed as giving the same output on 5.12.1 |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Thu Jul 22 09:14:47 2010, ikegami@adaelis.com wrote:
Under the new scheme, given($array_ref) won’t be particularly So should given(@a) continue to turn automagically into given(\@a)? -- Father Chrysostomos |
From @doyOn Tue, Sep 11, 2012 at 10:34:14PM -0700, Father Chrysostomos via RT wrote:
Oh, so it's not just when(), but given also has weird syntax special In my opinion, as long as we're fixing everything else, given(@a) should -doy |
From @cpansproutOn Tue Sep 11 22:37:30 2012, doy@tozt.net wrote:
This is probably getting off-topic for this ticket, but newWHENOP is Is this something that can change? (I.e., if we are going to break Perl -- Father Chrysostomos |
Migrated from rt.perl.org#76660 (status was 'open')
Searchable as RT76660$
The text was updated successfully, but these errors were encountered: