[OT] Perl woes

Adrian Howard adrianh at quietstars.com
Wed Jan 28 11:16:31 GMT 2009

On 28 Jan 2009, at 10:56, Jonathan Kimmitt wrote:

> 	Whoever said, the primary purpose of a compiler is to check for
> errors,
> 	and only if there are no errors, create the code, was most
> definitely not talking about Perl.
> 	The next time I use == instead of eq to compare two strings, I
> will know to expect it will always
> 	evaluate to true. What other language does this (apart from C,
> which would invariably return false)
> 	It would be a trivial matter to return an error or warning if ==
> is used for items which aren't numbers

You mean like

% cat foo.pl
#! /usr/bin/perl
use strict;
use warnings;
print "look a warning" if 1 == "fish";

% perl foo.pl
Argument "fish" isn't numeric in numeric eq (==) at foo.pl line 6.




More information about the london.pm mailing list