in reply to perl leaving out the last value?

Thank you all for your replies! I am revising it..Will update if I still face any issues. Thanks again.