Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: unGodly problems with pop()

by synapse0 (Pilgrim)
on Jul 13, 2001 at 06:22 UTC ( [id://96267]=note: print w/replies, xml ) Need Help??


in reply to unGodly problems with pop()

the others that have posted have given good info on some troubleshooting tips. Another (as was suggested, there may be whitespace at the end that's fouling you up) is to try:
# get rid of trailing whitespace chomp $rest; # split on consecutive whitespace # (includes tabs and mult spaces) @rest_ary = split(/\s+/, $rest); # grab last item $pass = $rest_ary[$#rest_ary]; print "pass = $pass\n"; # just to double check - for ($x = 0; $x <= $#rest; $x++) { print "array item $x = $rest[$x]\n"; }
That may shed some light...
-Syn0

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found