# I have the following two arrays @foo = ( # date_time -----# #foo# ["20031001 000000", 1.4], ["20031001 001500", 1.5], ["20031001 003000", 1.6], ["20031001 004500", 1.5], ["20031001 010000", 1.4], ); @bar = ( # date_time -----# #bar# ["20031001 000000", 0.001], ["20031001 000005", 0.004], ["20031001 000015", 0.005], ["20031001 001000", 0.008], ["20031001 001005", 0.007], ["20031001 001500", 0.007], ["20031001 001515", 0.007], ); # and I want the following array # @baz is a mashup of the above two # @baz is sorted on the date_time stamps (the first col), and # 'undef' is used for any missing value in corresponding arrays @baz = ( # date_time -----# #foo#, #bar# ["20031001 000000", 1.4, 0.001], ["20031001 000005", undef, 0.004], ["20031001 000015", undef, 0.005], ["20031001 001000", undef, 0.008], ["20031001 001005", undef, 0.007], ["20031001 001500", 1.5, 0.007], ["20031001 001515", undef, 0.007], ["20031001 003000", 1.6, undef], ["20031001 004500", 1.5, undef], ["20031001 010000", 1.4, undef], );