my ($f1, $f2, $f3, $f4, $f5, $f6, $f7) = ("") x 7; #$f3="C"; if ( not defined $f3 or $f3 eq '' ) { $f5 = "N"; $f7 = "G"; print "the 7th and 8th blocks should have values \n"; } my $xout = "system|$f2|$f3|$f4|$f5|$f6|$f7|\n"; print $xout;