in reply to Re: strip perl comment lines
in thread strip perl comment lines

It's not impossible if you base your comment-remover on the perltidy program. Not sure how you would do that, though.

japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: Re: strip perl comment lines
by merlyn (Sage) on Feb 07, 2001 at 20:03 UTC
    No, it's impossible. You can't parse an arbitrary Perl program statically and assign meaning to every token. I've demonstrated that here in my now famous "On Parsing Perl" note. You can get arbitrarily close but there will always be that gap.

    -- Randal L. Schwartz, Perl hacker