* gabriele renzi <[EMAIL PROTECTED]> [2007-04-14 22:20]:
> sorry about the dumb question but I'm not sure I understand the
> <at($pos)> assertion.
> 
> If I write something like
>  my $s="hello"
>  s/<at(1)>/a/
> I expected it to give me
>  "hallo"
> whereas it give ms
>  "haello".
> 
> Does it mean that basically the assertion is a character/string
> property instead of the character/string itself?

No, it is a zero-width assertion. `at(1)` means the position
“between” the 0th and 1th character of the string.

> Also, what is the correct way to replace the i-th character in
> a Str ?

`substr`.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to