in reply to Re^4: Make select apply to modules as well
in thread Make select apply to modules as well

You might not mean to say that there is a bug in Perl, but you are saying it!

What you're asking boils down to, "I want Perl to work as documented." Well Perl does. So the problem isn't there - it is somewhere else in your code.

As for figuring your code out, I strongly advise that you get in the habit of writing little snippets to test theories like this. Because right now you're staring at a mass of code and you are coming up with a theory. You aren't testing that theory, or verifying it, you are coming up with it and then posting for help based on your theory. But your theory is wrong. Nobody can provide you with help based on your theory, because you haven't actually identified your problem!

This isn't an effective debugging strategy. It is a very common one that people naturally fall into. It takes a lot of experience and patience to avoid this trap (been there, done that - we all have). And you won't progress until you start doing something more effective.

So sitting where I am, all that I can do is tell you that the problem isn't what you think it is. You'll have to look elsewhere. I told you a couple of other places to look. But without your code I can't do more than guess either. (Again, not very effective. But at least my guesses are based on a lot of experience about what can go wrong, so I'll come up with theories that are possible, if not likely.)

  • Comment on Re^5: Make select apply to modules as well

Replies are listed 'Best First'.
Re^6: Make select apply to modules as well
by richz (Beadle) on Dec 05, 2004 at 22:02 UTC
    I've done plenty of debugging bro, but I'm a C/C++/Java programmer and a realtively new Perl one. Therefore, my first intent was to just figure out whether select should have the effect I wanted it to have. Secondly, I didn't want to waste my time debugging the problem if I found out later that that is the expected behavior of select.

    Anyways, as it turns out it is some strangeness as I explained above in another post. Perhaps something to do with modifying $^I.

    Thanks for your help, have a beer. Cheers!

      The debugging strategy that I outlined applies no matter what language you're working in or how much experience you have at debugging.

      If you'd followed that advice in the first place (check documentation, write test programs to check behaviour, only then come up with a solid theory), then you would have been able to figure out your problem without even having to ask the question here.

      Not only would that have saved you time, but you'd have saved other people time as well.