I made the change and I still get the same error.
Could it be b/c I use my $node in ANodeLogin and once I leave that methode $node evaporates?
thanks for your help!
| [reply] |
use Data::Dumper;
print Dumper($node);
right before line 62.
Update: Given what sgifford says below, I would suspect either (1) you have another code path which adds to @nodes, or (2) you didn't change the code you were running. In fact, one reason I suggested adding the print Dumper statement was to make sure that you were changing (and saving) the right code. Don't feel too bad if this happens to you. I have to be on the guard against this all the time; it has happened to me too many times over the years. Given how Perl can search many places for a module, that I have two different versions of Perl on my PC, that I often edit on a different system from the one I run on, that there are development, test, and production environments, etc., etc. you have to keep on your toes. Eternal vigilance!
| [reply] [d/l] [select] |
This fix works for me. I'm running this program:
and it outputs:
What node would you like to log out of
--->0<---
--->1<---
--->2<---
--->3<---
Without the fix from Thelonius, I get the error you were seeing.
Maybe the problem is being introduced elsewhere in your program.
| [reply] [d/l] |