Pattern matching and for loops

2006-01-13 Thread Dave Whipp
Today I wrote some perl5 code for the umpteenth time. Basically: for( my $i=0; $i $#ARGV; $i++ ) { next unless $ARGV[$i] eq -f; $i++; $ARGV[$i] = absolute_filename $ARGV[$i]; } chdir foo; exec bar, @ARGV; I'm trying to work out if there's a clever perl6 way to write

Re: Pattern matching and for loops

2006-01-13 Thread Austin Hastings
Dave Whipp wrote: Today I wrote some perl5 code for the umpteenth time. Basically: for( my $i=0; $i $#ARGV; $i++ ) { next unless $ARGV[$i] eq -f; $i++; $ARGV[$i] = absolute_filename $ARGV[$i]; } chdir foo; exec bar, @ARGV; I'm trying to work out if there's a

Re: Pattern matching and for loops

2006-01-13 Thread Brad Bowman
On 13/01/06 20:36, Dave Whipp wrote: Is there some way to associate alternate codeblocks for different patterns (i.e. local anonymous MMD)? Is it possible to have an anonymous multi sub? This would seem to require new syntax for combining two anonymous definitions. Of course we want