Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Stupid mistakes I repeatedly make

by matthewb (Curate)
on Mar 27, 2005 at 04:24 UTC ( [id://442601]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Stupid mistakes I repeatedly make

++ nice to know you're human.

I have a personal bug that typically irritates me about twice a week. It is that, even if it is a value in some hash, my brain interprets a method call as a something that should end with a semicolon. Thus, I frequently type something like:

my $hash = { key1 => 'scalar value', key2 => [ qw( its an array ) ], key3 => Some::Package->method( $args, $go, $here, ); # <-- oops! };

This is somewhat insidious because it doesn't break emacs' syntax highlighting and perl -c /path/to/script reports the error as being on the next line. Ho hum, confession is good for the soul.


MB

Replies are listed 'Best First'.
Re^2: Stupid mistakes I repeatedly make
by brian_d_foy (Abbot) on Mar 27, 2005 at 20:58 UTC

    Ah, yes, I've done that one quite a bit too, and it's not just in a hash: I get it for list creation that goes into a normal array (or even into a list operator). I think this one is just finger memory: a semicolon just automatically comes after a closing paren.

    --
    brian d foy <brian@stonehenge.com>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://442601]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.