in reply to Re^2: On bad habits
in thread On bad habits

Verbose is fine, if it's clear and easy to read. Don't let people tell you that you must use $_ just because it's there.

Replies are listed 'Best First'.
Re^4: On bad habits
by Nkuvu (Priest) on Jun 21, 2005 at 18:19 UTC
    I don't have any good examples of my old bad code. But I'm referring to comments on how the Perl code is working when it is totally unnecessary. Comments like
    # Make '3' into '03' $some_value = sprintf "%02d", $some_value;
    or perhaps code snippets where it can easily be reduced -- note that this is a contrived example, because I tend to collapse my conditionals if possible (and have for a very long time). But still it illustrates my point:
    my $time = localtime(); if ($time =~ /^Tue/i) { if ($time =~ /2005$/) { print "It's some Tuesday in 2005\n"; } }