in reply to Re^2: Braino - why is this not working?
in thread Braino - why is this not working?
The closes such construct is the map, not the foreach
my @a = 1 .. 3; my @res = 0; for(@a){ my $ans = grep { warn ">>$_<< "; /^$_$/ } @res; warn "ans >>>$ans<<< " } __END__ >>0<< at - line 4. ans >>>1<<< at - line 8. >>0<< at - line 4. ans >>>1<<< at - line 8. >>0<< at - line 4. ans >>>1<<< at - line 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
not exactly, but yeah, anyway... ;-)
by perl-diddler (Chaplain) on Oct 19, 2010 at 03:35 UTC |