-users] Trying to change some punctuation in a string
I am hitting a mental block on this. I know that it is probably simple, but
I
will ask anyway. I am trying to convert a string of the form:
$string1 = "900/00-2.3"
to
$string2 = "900/00/2/3"
Here is what I hav
>From: Jon Shorie [mailto:[EMAIL PROTECTED]]
>
>I am hitting a mental block on this. I know that it is probably simple,
but I
>will ask anyway. I am trying to convert a string of the form:
>
>$string1 = "900/00-2.3"
>
>to
>
>$string2 = "900/00/2/3"
>
>Here is what I have so far:
>
>
>($n1,$r2)
I am hitting a mental block on this. I know that it is probably simple, but I
will ask anyway. I am trying to convert a string of the form:
$string1 = "900/00-2.3"
to
$string2 = "900/00/2/3"
Here is what I have so far:
($n1,$r2) = split(/-/, $string1);
($n2,$n3) = split(/./, $r2);
$string