my $string = "<1,2>:<5,7>:<3,0>"; my @x = split /\s*[,:]\s*/, $string; print "Extraction = @x\n"; print "1st element = $x[0]";