Two problems with the substitution you tried:
$temp = s|_|.|;
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;sub sk{ return unless $in = shift; $in =~ s!(.)$!!; print $1; sk($in)} sk("gro.alubaf@yehaf");
In reply to Re: substitution in a string
by skillet-thief
in thread substitution in a string
by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |