http://qs321.pair.com?node_id=299289


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