foreach $str1 (@arr1){
 foreach (@arr2) {
 @arr3 = split(/ /,"$_");
 print "array = @arr3  element0 = $arr3[0] element1 = $arr3[1]";   #this 
is just to check, it showing values 0 and 1 as correctly assigned
 print "$str1";
 }
}
 
arr1 contains lines like: (which will be values of str1 with each iteration)
comm bbbb cc $arr3[0] sdf xyz
comm scdrf cc $arr3[0] sdf xyz
comm dddbb cc $arr3[0] sdf xyz
 
arr2 contains:
123 34 54
234 32 13
233 44 56
 
therefore i want to generate the final $str1 as:
comm bbbb cc 123 sdf xyz
comm scdrf cc 234 sdf xyz
comm dddbb cc 233 sdf xyz
 
 
 
BUT I am getting:-----------SUBSTITUTION not happening!!!!
comm bbbb cc $arr3[0] sdf xyz
comm scdrf cc $arr3[0] sdf xyz
comm dddbb cc $arr3[0] sdf xyz
 
 
please help resolve. thx.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to