Ricardo SIGNES wrote:
* Cinzia Sala <[EMAIL PROTECTED]> [2004-07-07T09:35:42]
I would like to transform a string like :
MSDDIDWLHSRRGVCK
in a identical string, but with two spaces between each letter:
You wouldn't use tr/// for this. There are two simple ways:
$string =~ s/(.)(?!\Z)/$1 /g;
# re
* Cinzia Sala <[EMAIL PROTECTED]> [2004-07-07T09:35:42]
> I would like to transform a string like :
>
> MSDDIDWLHSRRGVCK
>
> in a identical string, but with two spaces between each letter:
>
You wouldn't use tr/// for this. There are two simple ways:
$string =~ s/(.)(?!\Z)/$1 /g;
# replace
Hi, I am a really new perl beginner and I would like to have some help.
I would like to transform a string like :
MSDDIDWLHSRRGVCK
in a identical string, but with two spaces between each letter:
M S D D I D W L H S R R G V C K
I have tried with tr
$string =~ tr/ABCDEFGHIJKLMNOPQRSTUV