Incrementing the letters in an array

2002-04-19 Thread Bryan R Harris
I'm a perl infant, but I had an idea: foreach (@array) { tr/a-zA-Z/b-zaB-ZA/ } - B __ 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]++; ho

Re: Incrementing the letters in an array

2002-04-19 Thread Gary Stainburn
On Thursday 18 April 2002 6:57 pm, Allison Ogle wrote: > Maybe it is because I am assigning my array to a line from another document > and not assigning letters dirtectly to the array because it still doesn't > work. It could be there is something wrong with my code too. > > > $word=; #where is

Re: Incrementing the letters in an array

2002-04-18 Thread drieux
On Thursday, April 18, 2002, at 03:37 , Mark Anderson wrote: > No, you need ++ vs +1. As they say in perl, ++ is magical and will do want you want. + 1 will not. Wags ;) ps -- is not magical in the same sense as ++ either. >>> >>> How would you decrement a character then?

RE: Incrementing the letters in an array

2002-04-18 Thread Mark Anderson
>>> No, you need ++ vs +1. As they say in perl, ++ is magical and will >>> do want you want. + 1 will not. >>> >>> Wags ;) ps -- is not magical in the same sense as ++ either. >> >> How would you decrement a character then? There surely has to be a >> way? > >perldoc -f ord >perldoc -f chr >

Re: Incrementing the letters in an array

2002-04-18 Thread drieux
On Thursday, April 18, 2002, at 03:14 , Elias Assmann wrote: > On Thu, 18 Apr 2002 [EMAIL PROTECTED] wrote: >> No, you need ++ vs +1. As they say in perl, ++ is magical and will >> do want you want. + 1 will not. >> >> Wags ;) ps -- is not magical in the same sense as ++ either. > > How w

RE: Incrementing the letters in an array

2002-04-18 Thread Elias Assmann
On Thu, 18 Apr 2002 [EMAIL PROTECTED] wrote: > No, you need ++ vs +1. As they say in perl, ++ is magical and will do want >you want. + 1 will not. > > Wags ;) ps -- is not magical in the same sense as ++ either. How would you decrement a character then? There surely has to be a way?

Re: Incrementing the letters in an array

2002-04-18 Thread John W. Krahn
Allison Ogle wrote: > > Maybe it is because I am assigning my array to a line from another document > and not assigning letters dirtectly to the array because it still doesn't > work. It could be there is something wrong with my code too. > > $word=; #where is the filehandle and therefore $wo

RE: Incrementing the letters in an array

2002-04-18 Thread Stout, Joel R
)++; print "$code[$y]\n"; } prints A then B... -Original Message- From: Allison Ogle [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 10:58 AM To: a a Subject: Incrementing the letters in an array Maybe it is because I am assigning my array to a line from another

RE: Incrementing the letters in an array

2002-04-18 Thread Mark Anderson
/\/\ark -Original Message- From: Allison Ogle [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:05 AM To: Mark Anderson Subject: RE: Incrementing the letters in an array If you're suggesting trying $code[$y]=$code[$y]++; it brings me one step closer in that

RE: Incrementing the letters in an array

2002-04-18 Thread Wagner-David
: Incrementing the letters in an array Maybe it is because I am assigning my array to a line from another document and not assigning letters dirtectly to the array because it still doesn't work. It could be there is something wrong with my code too. $word=; #where is the filehandl

Incrementing the letters in an array

2002-04-18 Thread Allison Ogle
Maybe it is because I am assigning my array to a line from another document and not assigning letters dirtectly to the array because it still doesn't work. It could be there is something wrong with my code too. $word=; #where is the filehandle and therefore $word gets the string from the inpu

Fwd: Incrementing the letters in an array

2002-04-18 Thread drieux
> On Thursday, April 18, 2002, at 09:04 , Allison Ogle wrote: > >> 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]++; > > did you check that yo

RE: Incrementing the letters in an array

2002-04-18 Thread Timothy Johnson
27;Allison Ogle'; a a Subject: RE: Incrementing the letters in an array Are you looking for something like this? $array[$x++]; #Moves to the next element in the array -Original Message- From: Allison Ogle [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 9:05 AM To: a a S

RE: Incrementing the letters in an array

2002-04-18 Thread Timothy Johnson
Are you looking for something like this? $array[$x++]; #Moves to the next element in the array -Original Message- From: Allison Ogle [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 9:05 AM To: a a Subject: Incrementing the letters in an array Hi, I have an array which

RE: Incrementing the letters in an array

2002-04-18 Thread Nikola Janceski
002 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 >

RE: Incrementing the letters in an array

2002-04-18 Thread Wagner-David
Ogle [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 09:05 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 lik

Incrementing the letters in an array

2002-04-18 Thread Allison Ogle
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 -