Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Why am I getting message «Operation "<=>": no method found,» ?

by 1nickt (Canon)
on Aug 01, 2015 at 15:11 UTC ( [id://1137117]=note: print w/replies, xml ) Need Help??


in reply to Why am I getting message «Operation "<=>": no method found,» ?

Use Data::Dumper or similar to examine your data whenever you get something weird like this. Your two hashes are very different. First time through (on solution):

$VAR1 = { 'ParisFR' => ' 264.965452179665817', 'Montana' => ' 7596.858969274226183', 'Correze' => ' 639.457965193499604' };

Second time through (problem):

$VAR1 = { 'ParisFR' => bless( { 'unit' => 'kilometre', 'values' => { 'kilometre' => '264.9654 +52179666' } }, 'Class::Measure::Length' ), 'Montana' => bless( { 'unit' => 'kilometre', 'values' => { 'kilometre' => '7596.858 +96927423' } }, 'Class::Measure::Length' ), 'Correze' => bless( { 'unit' => 'kilometre', 'values' => { 'kilometre' => '639.4579 +651935' } }, 'Class::Measure::Length' ) };
The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1137117]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-19 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found