Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Argument "Longitude" isn't numeric in subtraction (-) at C:\MyScripts\ +2G3Gdistance.pl line 53, <COMBINED> line 5852 (#1) Argument "Latitude" isn't numeric in multiplication (*) at C:\MyScript +s\2G3Gdistance.pl line 80, <COMBINED> line 5852 (#1)

These are clearly the results of you trying to perform arithmetic on the values obtained from your data file's header row. Don't do that. Only start processing the actual data from row 2 onwards.

Use of uninitialized value $lon2 in subtraction (-) at C:\MyScripts\2G3Gdistance.pl line 53, <COMBINED> line 5852 (#2)

This suggests that you have not parsed the data file correctly because $lon2 remains undefined. I suggest that you print out the values of all the arguments to distance() as soon as you retrieve them in order to determine how the parsing has failed and then correct that. The later errors are likely propagations of this problem.

Do take a look through the Basic debugging checklist if you have not already done so. It will help you clear up such similar problems in future.


In reply to Re^3: Nested foreach loops by hippo
in thread Nested foreach loops by keienn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (8)
As of 2024-04-23 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found