in reply to How can you split inside pop?

In this case you may be better off using a slice of what you just split:
perl -le '$s = "this is a string"; print +(split(/\s/, $s))[-1];'
-- dug