in reply to no output
Tip # from the Basic debugging checklist: use strict. $lin is not the same as $line. Other observations: