On Fri, Feb 17, 2012 at 10:18:57PM -0600, Reini Urban wrote:
> I proposed exists to clarify the meaning against the abuse of
> defined() to test for defined'ness and to help the language.
Perl, abusing defined since 1989:
$ ./perl -e 'sub def {print defined $a ? "Yes\n" : "No\n";}' -e '&def(); $a = "$]\n"; &def();'
No
Yes
$ ./perl -e 'print "$]\n";'
$Header: perly.c,v 3.0 89/10/18 15:22:21 lwall Locked $
Patch level: 0
[Perl 3 doesn't like building on anything. Even AIX.
It also seems to be very fussy about newlines after subroutine definitions.
The world must have been very different 22 years ago.
But it doesn't surprise me that Perl has pedigree in "doing it wrong". As
only a mongrel can.]
Nicholas Clark
Thread Previous
|
Thread Next