Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Stupid mistakes I repeatedly make

by matthewb (Curate)
on Mar 27, 2005 at 09:24 UTC ( #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.


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 <>

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2021-04-15 15:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found