I've been trying to figure out how to print 2 arrays into 2 columns. I came across this code and it works but gives me a problem in the output.
*************************BEGIN CODE********************************************* sub transpose { map { my $i = $_; [ map $_->[ $i ], @_ ] } 0 .. $#{ $_[0] } } print "@$_\n" for transpose \( @unknown_abs, @unknown_conc ); *************************END CODE************************************************ *************************BEGIN OUTPUT****************************************** 0.1 0.729843646443355 0.2 1.47255203636502 0.35 2.58661462124751 0.33 2.43807294326318 0.41 3.03223965520051 *************************END OUTPUT********************************************* So 0.1, 0.2, 0.35, 0.33, 0.41 should be in one column and the other values next to it. I'm trying to figure out how to reduce precision with printf but not really sure about that. Thanks -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/