http://qs321.pair.com?node_id=1105865


in reply to Augmented pipe delimited output

Hi MrTEE

You're masking the values of $f5 and $f7 by declaring them with "my" a second time. You also need to delay the creation of your $xout string until after all your variables are properly set. Try something like:

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;