Ahhhhhh...that's it! I didn't realize that. Now it makes sense! Thanks for clearing
this up! Any other advice on getting through this book? Thanks again!
-----Original Message-----
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
Sent: Friday, June 20, 2003 1:56 PM
To: Anthony Beaman
Cc: Jenda Krynicky; [EMAIL PROTECTED]
Subject: RE: Array Question (Learning Perl/Win32 Chapter Test
Question)
On Jun 20, Anthony Beaman said:
>But what's the "-1" for? Why not just "$b[$a]" instead? That's what
I'm
>confused about.
Arrays start at 0. Thus, the first element of an array is $array[0].
Line numbers (as far as human think of them) start at 1. The first
line
is considered line 1. Therefore, humans are thinking +1 from what
computers are thinking. To correct this, you subtract 1 from what the
human enters, and the computer does the right thing.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED]
http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/
http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of
course.
[ I'm looking for programming work. If you like my work, let me
know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]