Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: incorrect results

by Anonymous Monk
on Apr 30, 2007 at 21:13 UTC ( [id://612868]=note: print w/replies, xml ) Need Help??


in reply to Re: incorrect results
in thread incorrect results

There are both integers and strings in the compared values.

Replies are listed 'Best First'.
Re^3: incorrect results
by blazar (Canon) on May 01, 2007 at 08:58 UTC
    There are both integers and strings in the compared values.

    (Caveat: I've not been following the previous discussion.)

    Strictly speaking this does not make sense. Even more strictly you can use Scalar::Util's dualvar() to create a scalar that will have two completely unrelated values in "numeric context" and in "string context" (note that these are not even precisely defined in Perl 5) respectively, but take this as an aside: generally perl will do what you mean in a very convenient way, with automatic conversions between numbers and strings. So you probably have strings that may occasionally look like numbers and you may want to sort numerically in the latter case. You may also want to do some checks to verify if that is the case.

      when I am printing I tried sorting the data saperatly into digits and integers. But it doesnt seem to be working. FOr some reason the when printing its not able to disassociate the variable for only on particular parameter value. Now when I run the ssh exclusively for the particular server, then the printout seems to look as expected. The confusion comes up when the ssh is running on multiple servers.
        when I am printing I tried sorting the data saperatly into digits and integers. But it doesnt seem to be working. FOr some reason the when printing its not able to disassociate the variable for only on particular parameter value. Now when I run the ssh exclusively for the particular server, then the printout seems to look as expected. The confusion comes up when the ssh is running on multiple servers.

        This does not really make sense. That is, what things are like with strings and numbers is (not really that) simple, and explained elsewhere in this thread. As I told you I haven't had much time to dig into it, and I don't have it now. But basically you have some data, on which you have to do some manipulations. What you say about getting them over ssh may either mean that you have a problem with that or with the manipulation itself. In the latter case, it's irrelevant where the data come from. So you should try to isolate the problem by getting the data all at once and possibly compare those that do "work" with those that don't.

      I corrected the data structure and its working now. thank u
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found