Perl Monk, Perl Meditation | |
PerlMonks |
Re: substitution in a stringby skillet-thief (Friar) |
on Sep 28, 2005 at 08:47 UTC ( [id://495665]=note: print w/replies, xml ) | Need Help?? |
Two problems with the substitution you tried:
First, you need a tilde: $temp =~ s/// Second, you need the /g operator so that more than just the first "_" is replaced. $temp =~ s|_|.|g;
In Section
Seekers of Perl Wisdom
|
|