develooper Front page | perl.perl6.users | Postings from October 2019

Re: Match operator: error with any() junction and user-defined $_topic variable

Thread Previous | Thread Next
From:
ToddAndMargo via perl6-users
Date:
October 11, 2019 23:24
Subject:
Re: Match operator: error with any() junction and user-defined $_topic variable
Message ID:
272a3ca9-7e87-0fdc-3f9c-eca761a8dd4a@zoho.com
On 10/11/19 2:46 AM, William Michels via perl6-users wrote:
> Below works:
> 
> mbook:~ homedir$ perl6 -e 'my $x = (44, 66); say $x; say $x.any < 43'
> (44 66)
> any(False, False)
> #
> mbook:~ homedir$ perl6 -e 'my $x = (44, 66); say $x; say $x.any < 50'
> (44 66)
> any(True, False)
> #
> mbook:~ homedir$ perl6 -e 'my $x=0; my $any=2|4|8; $x==$any ?? put "x
> exists, value= $x" !! put "not there";'
> not there
> #
> mbook:~ homedir$ perl6 -e 'my $x=4; my $any=2|4|8; $x==$any ?? put "x
> exists, value= $x" !! put "not there";'
> x exists, value= 4
> #
> 
> HTH, Bill.

Sweet.  Love examples.  Thank you!

Question:  what type is "my $x = (44, 66)".   An array?

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