#!/usr/bin/perl $b="a b c d e f g h i j"; $a="1 3 45 65 7 89 67 9 8 2"; @seq=split(/ /,$b); @arr=split(/ /,$a); $beg=0; $end=0; for($i=0;$i