in reply to Re: a natural way of expressing things
in thread a natural way of expressing things

Alternatively a one-shot for loop can be used:

for my $name ( $tree->ancestor->son->sibbling ) { if ( $name ... ) { # ... } # ... }
Differences:

  • $name is scoped within the for block
  • $name is an alias of the original, not a copy

    Anno