G
Gunnar Hjalmarsson
Dan said:What's the generally accepted or most efficient way to "subtract"
one string from another, or to remove a substring from a string.
In other words, something like this:
my $string = "This is a really neat string.";
my $stringtosub = "really neat ";
#doesn't work
my $newstring = $string - $stringtosub;
#$newstring would now be "This is a string."
(my $newstring = $string) =~ s/$stringtosub//;