#!/usr/bin/perl -w use strict; my $string = '0-0-0-23-34-2345-345-21-0-0-0-256-78-0-0-0-0-0-0-0-56-45-3-34-0-2-3-4-5-6-0-0-0-0-0-0'; for my $match ($string =~/(?