develooper Front page | perl.perl5.porters | Postings from December 2008

Re: [perl #61754] 'Data::Dumper' reports double value as string.

Thread Previous
From:
Slaven Rezic
Date:
December 27, 2008 13:03
Subject:
Re: [perl #61754] 'Data::Dumper' reports double value as string.
Message ID:
87hc4p9vqg.fsf@biokovo-amd64.herceg.de
Anatoly Grishaev (via RT) <perlbug-followup@perl.org> writes:

> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61754 >
>
> $ perl -MData::Dumper -e'print Dumper(1.0)'
> $VAR1 = '1';
> must be:  
> $VAR1 = 1;
>
> ===Note single quotes===
>

Note that the result depends whether the XS or the pure perl
implementation is used:

$ perl -MData::Dumper -e'$Data::Dumper::Useperl=0; print Dumper(1.0)'
$VAR1 = '1';
$ perl -MData::Dumper -e'$Data::Dumper::Useperl=1; print Dumper(1.0)'
$VAR1 = 1;

Regards,
    Slaven

-- 
Slaven Rezic - slaven <at> rezic <dot> de
  BBBike - route planner for cyclists in Berlin
  WWW version:                           http://www.bbbike.de
  Perl/Tk version for Unix and Windows:  http://bbbike.sourceforge.net

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