Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Stupid mistakes I repeatedly make

by itub (Priest)
on Mar 27, 2005 at 15:33 UTC ( [id://442629]=note: print w/replies, xml ) Need Help??


in reply to Stupid mistakes I repeatedly make

I've made most of those errors at least once, but the most common for me is the last one (my( $n, $m, $o ) = shift;). By now I've tried to standardized on my ($n) = @_ even for one parameter, but when I change code that has shifts I often forget.

It would be interesting to set up a poll titled "The stupid mistake that I make most often" with some of the errors discussed in this thread.

Replies are listed 'Best First'.
Re^2: Stupid mistakes I repeatedly make
by geekgrrl (Pilgrim) on Mar 29, 2005 at 22:42 UTC

    I used to do the my ($n, $m, $o) = shift so often that I vigorously enforce always using @_ now in my code. Because without fail the one time I use shift, I end up adding a variable later.

    Plus I get really annoyed with all the extra typing I have to do to convert it from one format to the other. I suppose I should create an emacs macro to do that for me...Its good to know that laziness does indeed support good habits. ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2025-07-15 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.