in reply to Advanced replace function
You may be looking for the /g option to s///:
my $str="abc t[poop1] def [doop2] [woop3] xyz";
$str =~ s/\[.*?\]/~~/g;
abc t~~ def ~~ ~~ xyz
But that's risky, especially if you use it a larger pattern. The /.*?/ could match a "[" or a "]". That's obviously undesirable. The following pattern avoids that problem:
There is no Extraterrestrial life
There aren't any suitably capable Extraterrestrials
Interstellar travel is too difficult
We're too uncool / not worth the trouble
What do you mean they haven't visited?
Results (463 votes). Check out past polls.