M
Mark
Hello,
I have 2 scalars. I want to remove all occurences of one within the other.
I've tried this:
$delim = '|';
$value = "||||||||T||||||e||||||||||s|||||||||t||||||||!||||||";
$value =~ s/$delim//g;
print "$value\n";
.... but it doesn't work - it prints $value unaltered. What do I need to do
to the "$value =~ s/$delim//g;" line to realise that I'm reffering to the
_value_ of $delim, rather than the literal text "$delim"?
This is possibly a FAQ, but it's dead hard to know what to put into Go-Ogle
to find this information.
Thanks for any help,
Mark
I have 2 scalars. I want to remove all occurences of one within the other.
I've tried this:
$delim = '|';
$value = "||||||||T||||||e||||||||||s|||||||||t||||||||!||||||";
$value =~ s/$delim//g;
print "$value\n";
.... but it doesn't work - it prints $value unaltered. What do I need to do
to the "$value =~ s/$delim//g;" line to realise that I'm reffering to the
_value_ of $delim, rather than the literal text "$delim"?
This is possibly a FAQ, but it's dead hard to know what to put into Go-Ogle
to find this information.
Thanks for any help,
Mark