John W. Krahn wrote:
>
> Rob Dixon wrote:
>>
>>    s/([a-z])/$variables[ord($1) - ord('a')]/ge;
>
> You don't need the /e option there.  (Try it if you don't believe me.)

Fascinating. Thanks John. And all because the expression's inside an array
index.

  s/([a-z])/$variables[do{
    my $n = ord($1);
    $n-- for 1 .. ord('a');
    $n;
  }]/g;

is also fine!

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to