while () { next if /in\s*$/; print "$1.$2\n" if /^\s*Pin:\s+(\w+)\.(\w+)/; }