Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by 1nickt (Abbot)
on Aug 01, 2015 at 15:11 UTC ( #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
Node Status?
node history
Node Type: note [id://1137117]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2019-12-15 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?