Austin~ On 9/29/05, Austin Hastings <[EMAIL PROTECTED]> wrote: > Matt Fowles wrote: > > >Austin~ > > > >On 9/29/05, Austin Hastings <[EMAIL PROTECTED]> wrote: > > > > > >>Plus it's hard to talk about backwards. If you say > >> > >>for @l -> ?$prev, $curr, ?$next {...} > >> > >>what happens when you have two items in the list? I think we're best off > >>using signature rules: optional stuff comes last. > >> > >> > > > >I disagree, I think that is an easy call > > > >for (1, 2) -> ?$prev, $cur, ?$next { > > say "$prev -> $cur" if $prev; > > say $cur; > > say "$cur -> $next" if $next; > > say "next"; > >} > > > >should print > > > >1 > >1 -> 2 > >next > >1 -> 2 > >2 > >next > > > > > > > Did you mean: > > next > 1 -> 2 # two spaces > > there?
No, my logic is that the loop is run through twice, once with (undef, 1, 2) and once with (1, 2, undef). Matt -- "Computer Science is merely the post-Turing Decline of Formal Systems Theory." -Stan Kelly-Bootle, The Devil's DP Dictionary