Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Stupid mistakes I repeatedly make

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


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 28, 2005 at 01: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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-16 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found