develooper Front page | perl.perl5.porters | Postings from January 2011

Re: Using smart matching to find whether an array contains a string

Thread Previous | Thread Next
From:
Abigail
Date:
January 27, 2011 03:17
Subject:
Re: Using smart matching to find whether an array contains a string
Message ID:
20110127111733.GV8853@almanda
On Thu, Jan 27, 2011 at 11:09:24AM +0000, Ed Avis wrote:
> Dr.Ruud <rvtol+usenet <at> isolution.nl> writes:
> 
> >Who doesn't use Data::Dumper daily?
> >
> >perl -MData::Dumper -wle 'print Dumper [ 0, "0", 0.0, 0_0, 0_0.0, ]'
> 
> I have switched to Data::Dump, which is nicer in some ways.  In this particular
> case it shows the first four numbers as just 0 and the last, oddly, as "00".

It's not odd.

   0_0.0

is equal to

   0_0 . 0

or

   0 . 0

aka

   "00"


Use of _ forces the number to be parsed as an integer, not a float.



Abigail

Thread Previous | Thread Next


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