[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Code reduction



On Thu, 17 May 2007, Sean Baker wrote:
That would work if it had a ")".

Doh again! Yup.  :)

And possibly this:

next if ($row[20] !~ /^(PENDING|ACTIVE)$/);

:)

I spent two hours one day banging my forhead because I typo'd !~ as !=. I can't trust myself with !~. :)

I don't know what != // is *supposed* to do, but it doesn't syntax error:

$ cat j.pl
my $a = "egg";
if ($a !~ /plant/) {
  print "no match 1\n";
}
if ($a != /plant/) {
  print "no match 2\n";
}

$ perl j.pl
no match 1

When my typos don't syntax error I'm in trouble because my brain doesn't see them when I stare at my code.

j
luvs punctuation wars
and driving Pythonistas crazy with Perl "line noise" :)