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,(@rest = split(/ /, $rest);
doesn't work, I$apass = pop @rest;
and get nothing at all. I thought perhaps maybe I was just a really bad coder and $rest or @rest was empty, but I canprint "ATTEMPT PASS: $apass\n";
andprint "\$REST: $rest\n";
and I get data everytime! (the correct data!)foreach $i @rest { print "\@REST: $i\n";
So I did more looking and saw that pop @rest; should return $_, so I
and get NO data other than my "$_" literal...print "\$_: $_\n";
I'm SO stumped on this, it isnt even funny. Thanks for the help! Terron the lamer
Edit: chipmunk 2001-07-12
Edit: neophyte 2001-07-13 for better readability
In reply to unGodly problems with pop() by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |