usewarnings;my$string="4 2 6 7";my$i=6;#use any value of $imy@x=split/ /,$string;my$count=0;foreach(@x){if($_==$i){print"matched at position $count";die$!;}$count++;}print"integer doesn't found in string";