http://www.perlmonks.org?node_id=1017064


in reply to File Find/Replace with the replacement coming from part of earlier matched string

3 commands for every pc name?
if empty line then print empty line
You don't want to do that.