in reply to Re^2: [RFC] Module code and POD for CPAN
in thread [RFC] Module code and POD for CPAN

This isn't python, the last element in the range is not excluded!
for my $i (0 .. $#{ $self->{trolley} }) {

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: [RFC] Module code and POD for CPAN
by Bod (Parson) on Apr 14, 2021 at 12:43 UTC
    This isn't python, the last element in the range is not excluded!

    I wouldn't know...my knowledge of python is non-existent. I wouldn't recognise the code unless the file had a .py extension!

    I actually originally wrote:

    for my $i (0 .. $#{ $self->{trolley} }) { # ... }
    but thought it would be better to omit the code block completely in providing the example.