in reply to Not sure how it's working?
Your understanding of chomp is accurate
However, since this program accomplishes nothing real ... if you can explain what you think every line is doing, then I could help you make sense of it