If you want to do it with map:
map {/^cat\b/ .. /^\^cat\b/ ? s/^/#/r : $_} @a;
Greetings,
-jo
In reply to Re: can u suggest a regex for this ?
by jo37
in thread can u suggest a regex for this ?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |