From: Rafael Garcia-Suarez Date: Wed, 12 Jul 2006 12:29:58 +0000 (+0000) Subject: I prefer array indexes that start from 0 in beginner docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c678d221c45ecc598a0787080aae23781c1945d;p=p5sagit%2Fp5-mst-13.2.git I prefer array indexes that start from 0 in beginner docs p4raw-id: //depot/perl@28558 --- diff --git a/pod/perlintro.pod b/pod/perlintro.pod index 5e5923d..da9c2af 100644 --- a/pod/perlintro.pod +++ b/pod/perlintro.pod @@ -376,7 +376,7 @@ the more friendly list scanning C loop. print "This element is $_\n"; } - print $list[$_] foreach 1 .. $max; + print $list[$_] foreach 0 .. $max; # you don't have to use the default $_ either... foreach my $key (keys %hash) {