In the Dumper output in this example, the single-quotes around the nummbers (e.g., $VAR1 = '5601.57') indicate that Perl still sees these scalars as strings
Actually, one has to be very careful with statements like these - there is no reliable way to ask Perl for the difference between e.g. 1 and "1". Although Data::Dumper has some code that tries to peek under the hood, it's not perfect:
use Data::Dumper; my $str = "1"; print Dumper($str); # $VAR1 = '1'; my $n = $str + 1; print Dumper($str); # $VAR1 = 1;
Update: Pointed the link above to a better node with more references.
|Replies are listed 'Best First'.|
Re^5: The error says the value is uninitialized, but it works anyway
by Anonymous Monk on Aug 18, 2019 at 09:55 UTC
by haukex (Chancellor) on Aug 18, 2019 at 10:19 UTC