Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: incorrect results

by blazar (Canon)
on May 01, 2007 at 08:58 UTC ( [id://612933]=note: print w/replies, xml ) Need Help??


in reply to Re^2: incorrect results
in thread incorrect results

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.

Replies are listed 'Best First'.
Re^4: incorrect results
by Anonymous Monk on May 01, 2007 at 18:33 UTC
    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.

Re^4: incorrect results
by Anonymous Monk on May 03, 2007 at 13:17 UTC
    I corrected the data structure and its working now. thank u

Log In?
Username:
Password:

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

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

    No recent polls found