molecules has asked for the wisdom of the Perl Monks concerning the following question:
The code below gives me the output
Thanks!
when clearly it is in the array. Am I doing something wrong? Is it a future implementation issue?["1", "2", "3", "4"] scalar '1' not in 1 2 3 4
I'm using Rakudo Star on Windows 7, 64-bit.use v6; my @array = <1 2 3 4>; @array.perl.say; my $scalar = '1'; if $scalar ~~ @array { say 'scalar in array'; } else { say "scalar '$scalar' not in @array[]"; }
Thanks!
Back to
Seekers of Perl Wisdom