Looking for advice (perl or just generic approach) to programmatically find duplicated blocks of code across 40 or so php script files, so i can then manually refactor these code chunks that i know do exist. It's not doable manually as we're talking 55k+ lines of code total. The copy/pasted bits of duplicate code are not identified with any function or class structure, i.e. pure procedural code someone else wrote. that's unfortunatelly how the dev on this occured before my work with it starting. author is available but it's also beyond his ability (or anyone's) to now manually unravel the duplication by hand.
the hardest line to type correctly is: stty erase ^H