Just another Perl shrine | |
PerlMonks |
Re: What is wrong here (Replacing Strin pieces)by rjt (Curate) |
on Jul 16, 2013 at 11:22 UTC ( [id://1044558]=note: print w/replies, xml ) | Need Help?? |
The -+ matches all dashes at the start/end of the string, but you're replacing them with a single ?. You need to stuff in as many question marks as there were dashes. One way out of many, using eval (/e):
Output:
In Section
Seekers of Perl Wisdom
|
|