#!/usr/bin/perl # $node=1; while () { if (/Node Name: /) { print " Node Name: NODE$node\n"; } elseif (/TCP\/IP Address: /) { print " TCP/IP Address: 10.10.10.$node\n"; } else { print $_; } }