$type morgon2.pl use strict; use warnings; use List::MoreUtils 'indexes'; my @array=(1,2); my $i1 = indexes { $array[$_] == 1 } (0..$#array); my $i2 = indexes { $array[$_] == 2 } (0..$#array); my $i3 = indexes { $array[$_] == 3 } (0..$#array); print "<$i1> <$i2> <$i3>\n"; $perl morgon2.pl Use of uninitialized value $i3 in concatenation (.) or string at morgo +n2.pl line 10. <0> <1> <>
In reply to Re: grep surprise
by BillKSmith
in thread grep surprise
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |