This works:

use warnings;
use strict;


my @letters = qw( A B C D );

for (my $n = 0; $n < 4; $n++){
        $letters[$n]++;
        }

        
print "@letters\n";

> -----Original Message-----
> From: Allison Ogle [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 12:05 PM
> To: a a
> Subject: Incrementing the letters in an array
> 
> 
> Hi,
> 
> I have an array which contains letters.  I need to increment 
> these letters
> in the array one at a time.  For example going from B to C.  
> I was trying
> something like
> 
> $array[$x]++;
> 
> however that increments the letter to the number 1.  Does 
> anyone have any
> ideas?  Thanks in advance.
> 
> Allison
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to