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
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
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?
>>> 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
>
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
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?
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
)++;
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
/\/\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
: 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
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
> 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
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
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
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
>
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
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
-
17 matches
Mail list logo