Quote:
Originally Posted by MTK358
I want to replace the "prefix" and the contents of the brackrts, including the brackets themselves.
|
So, assuming that initially you have
Code:
my $s = 'HeadOnLongNeck{SomeBody}Tail';
you want $s to become
where 'Foo' is the text you want to have instead of 'HeadOnLongNeck{SomeBody}', correct ?
If it's the case, why not simply use Perl 's' operator - you gave an advice on it in a recent thread.
I think I've already written, read:
perldoc -f s
perldoc perlretut
perldoc perlre
.