in reply to print chomp <STDIN>

I think that this error:

error:Cant modify <HANDLE> in safe chop near <STDIN> 

its not a chomp error, the problem is that chomp try to modify <STDIN> and you cannot modify the <STDIN> :) like you cannot modify the special variable $1 when you get through of regexp.

PS: sorry for my bad english :)