in reply to match and edit block of text

Please expand on how you want to match a block. If you want to comment out the Alias and the belongning 'Directory' block, you should match the path like:
m/Alias.+"(.+)"/;
And then use $1 to match:
m/<Directory\s+"$1">/;
Then append a '#' to that line until you reach the end of the Directory block.

.:| If it can't be fixed .. Don't break it |:.