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

Re: Perl 5.10.1 Smartmatch Num ~~ Numish Options

Thread Previous
Aristotle Pagaltzis
September 2, 2009 15:56
Re: Perl 5.10.1 Smartmatch Num ~~ Numish Options
Message ID:
* Rafael Garcia-Suarez <> [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.

Aristotle Pagaltzis // <>

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About