in reply to Distinguishing code from not code

This might be a good project for someone to get their feet wet with PPI... Since it can now parse anything, even line noise, you could parse everything in each block and then take the resulting document and apply some heuristics to see whether or not it "looks like" Perl. Would certainly be a little more thorough than doing regex-like ways.

Replies are listed 'Best First'.
Re^2: Distinguishing code from not code
by qbxk (Friar) on Jan 01, 2006 at 15:44 UTC

      You want to look on the CPAN instead of the general web.

      Makeshifts last the longest.