On Apr 14, 5:22 am, shawnhco...@gmail.com (Shawn H Corey) wrote: > C.DeRykus wrote: > > And, here's the doozy for me as I tried remembering: > > > If the final value specified is not in the sequence that the > > magical increment would produce, the sequence continues > > until the next value is longer than the final value specified. > > ^^^^^^ > > > So, in the OP's 'u'..'z' example, the expansion stops at 'yz' > > because another increment would be 'za' which is 'longer' > > than the final value specified'; whereas, 'yz' isn't: > > Actually, no. "z" is in the sequence, so it stops there. > > Try: > > for ( 'u' .. ' ' ){ > print "$_ ";} > > print "\n";
No, the OP was talking about the *second* 'for' loop of course -- not the first loop which obviously works. OP> In the following code, the second for loop actually counts way OP> passed what I expected, and actually stops at "yz" and not "z" OP> as expected. The 'u'..'z' mis-identifies the loop but the context is clear as to which loop was being discussed. -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/