develooper Front page | perl.perl5.porters | Postings from September 2009

Re: Perl 5.10.1 Smartmatch Num ~~ Numish Options

Thread Previous
From:
Aristotle Pagaltzis
Date:
September 2, 2009 15:56
Subject:
Re: Perl 5.10.1 Smartmatch Num ~~ Numish Options
Message ID:
20090902225615.GA16176@klangraum.plasmasturm.org
* Rafael Garcia-Suarez <rgarciasuarez@gmail.com> [2009-09-02 00:00]:
> In Perl 5 you can't make the difference between a string and
> a number.

And FWIW, this actually extends further: there is also no boolean
type in PerlĀ 5. Truth is simply a property of most scalar values
and does not have a separate identity (ie. it is not some
distinct value in its own right). So you also cannot tell whether
a scalar is a boolean or not.

Which causes some annoyance in dealing with JSON or Bencode.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About