Help for this page
$ perl -e ' use strict; ... print join "->", grep defined, zip @M, @v; ' M1->v1->M2->v2->M3->v3->M4->v4->M5