in reply to Re^4: 5.40 released
in thread 5.40 released

Well, since i needed the iterator VALUE in the code, so for(0..9) was not an option. This is quite often the case in my code. To avoid mixing too many styles of constructs, i limited my coding style to use C-Style.

Plus, as mentioned, i often port between JavaScript, C/C++ and Perl, as well as doing a lot of Arduino development. For my use cases, for(0..9) is the cruft, proper C-Style loops are the norm ;-)

But, as i said, that's just the style guide for my own projects.

Replies are listed 'Best First'.
Re^6: 5.40 released
by hippo (Archbishop) on Jun 13, 2024 at 13:43 UTC
    Well, since i needed the iterator VALUE in the code, so for(0..9) was not an option.

    I'm not sure how this follows. Could you explain why this condition precludes the perlish loop?


    🦛

Re^6: 5.40 released
by jeffenstein (Hermit) on Jun 13, 2024 at 16:54 UTC
    Well, since i needed the iterator VALUE in the code, so for(0..9) was not an option. This is quite often the case in my code. To avoid mixing too many styles of constructs, i limited my coding style to use C-Style.

    for my $i(0..9){...}

    Or am I missing something?