Perl Monk, Perl Meditation | |
PerlMonks |
unGodly problems with pop()by Anonymous Monk |
on Jul 13, 2001 at 05:50 UTC ( [id://96261]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: Ok, here's a really weird one that I can't figure out for the life of me. I've got a scaler called $rest. The last element(word) in $rest is supposed to be a password, whether $rest is 1 element or 432678 elements. After reading up, I found the sexy pop function.. but since it only works on array's I did a little diddling with $rest so that it would be in array form to use pop. well, straightforward, doesn't work, I and get nothing at all. I thought perhaps maybe I was just a really bad coder and $rest or @rest was empty, but I can and and I get data everytime! (the correct data!) So I did more looking and saw that pop @rest; should return $_, so I and get NO data other than my "$_" literal... I'm SO stumped on this, it isnt even funny. Thanks for the help! Terron the lamer Edit: chipmunk 2001-07-12
Back to
Seekers of Perl Wisdom
|
|