Python/C++ vs. Perl/C++

Code Maintenance

Why Perl should be outlawed: Perl Zombies seem to be proud of their ability to write terse code. That's great if you are another Perl Guru. For normal people, it creates an unmaintainable morass of inscrutable code. This is the exact situation we have here at work. A previous employee, no longer here, wrote a tool for CM and nightly builds, etc. It consists of several Perl scripts and modules. None of the current employees has enough Perl knowledge to do much with it. I'm not even sure the original author could understand it now.

The task: Understand and modify a Perl Hacker's "code".

Comment on this topic

my @srcFiles=grep{!/\.bak$/i && !m{(^|/)CVS(/|$)} && -f $_} DfcD::GlobR("Src/*");

    { $0=~/(.*\\)?(.*)\./; print STDERR "$2 version 0.0.2\n\n"; }
    for (@ARGV) { m!^([-/]\?|-H|--help)$!i && &help() }
    0==@ARGV and &help();

bless [
    [DfcXxx::Sort keys %hDirs],
    [sort{lc $a->name cmp lc $b->name or $a->name cmp $b->name} values %hNonDirs],
    # undef,

Above are some actual code samples taken from a Perl tool at work. Admittedly they are extracted from context, but just look at that vomitus. It is enough to wilt good intentions at a glance. "I have some ideas on improving this tool. Let's see...good god, what is this shit? Forget it."


I don't have a clue what the above code snippets do, so cannot produce the Python version.