Hi all,
In a script of mine I have an url catched in a variable. Then, for custom url's, to let the script run well, I have to remove a part of it. I use the next code for that:
All good and well, but when I run this part, the substitution will remove all of the characters and symbols mentioned in the 'web/show'. But that's not what I want, I only want to remove the part 'web/show' and leave the rest of the url unharmed.
Could you please tell me how to fix this? You've proven to be a great help before.
In a script of mine I have an url catched in a variable. Then, for custom url's, to let the script run well, I have to remove a part of it. I use the next code for that:
Code:
my $fout1 = "web/show"; # This is the part of the url I want to remove, $ol_info[1] is the url
if($ol_info[1] =~ m/$fout1/){
$ol_info[1] =~ s/[$fout1]//isg;
}
All good and well, but when I run this part, the substitution will remove all of the characters and symbols mentioned in the 'web/show'. But that's not what I want, I only want to remove the part 'web/show' and leave the rest of the url unharmed.
Could you please tell me how to fix this? You've proven to be a great help before.