Perhaps the best way is to be verbose as in:
my @available; if ( $door[ $choice ] eq 'car' ) { # Can't beat him yet @available = grep { $choice != $_ } 0 .. 2; } else { # Make him lose! @available = grep { $doors[ $_ ] eq 'car' } 0 .. 2; }
In reply to Re^9: Marilyn Vos Savant's Monty Hall problem
by tilly
in thread Marilyn Vos Savant's Monty Hall problem
by mutated
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |