Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: On bad habits

by Nkuvu (Priest)
on Jun 21, 2005 at 18:19 UTC ( #468776=note: print w/replies, xml ) Need Help??


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

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"; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://468776]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2021-10-23 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (88 votes). Check out past polls.

    Notices?