I want to replace aeiou with bfjpv in user inputted string. Here is the code which is not working :-
print "Enter any String :";
while(($string = <>) ne "\n"){
@arr = split(//,$string);
for($i = 0 ; $i < $#arr ; $i++){
$char = $arr[$i];
if($char eq 'a' || $char eq 'e' || $char eq 'i' || $char eq 'o' || $char eq 'u'){
$char = $char + 1;
}
print $char;
}
}
What should I do to add one character? I mean how do I replace a
with b
.