in reply to STDIN not working, STDIN hanging

Just wanted to note that using  #! perl is not a good practice as it was recently pointed out to me around here. In this case it is probably not an issue, but #!/usr/bin/env perl is a better choice.