in reply to
Re: Stripping Comments
in thread
Stripping Comments
The problem with the first RE is that it removes the character before the hash mark. In your examples, it's always whitespace, so you didn't recognize it. You could replace the first regex with
s/([^\\])#.*/$1/;
[download]
Better yet, replace the first and second RE with the RE that
varian
provides. You'll need the third RE nonetheless.
Comment on
Re^2: Stripping Comments
Download
Code
In Section
Seekers of Perl Wisdom