print "this is line 1 $somevar this is line 2 $someothervar this is line 4 this is line 5 "; #### use constant { NODE=>0, TYPE=>1, COMMENT=>2 ...}; my @d; @d = ( split '\t' )[ 0,2,6,8,10,12,16,18,20,22,24,26 ]; select AUTOCONF; print " # Host @d[NODE, TYPE, CHECK, HOST, ALIVE] define host{\n use generic-host host_name $d[NODE] alias $d[COMMENT] address $d[IP] max_check_attempts 10 notification_interval 7 notification_period 24x7 notification_options d,u,r } ";