c:\@Work\Perl\monks>perl -wMstrict -le "my $str = 'ServiceCategoryName=(3,1,0,1,1,0)'; ;; if ($str =~ m/^ServiceCategoryName=(.*/) { print qq{'$str'}; my @array = split /,/, $str; print qq{first split element: '$array[0]'}; } " Unmatched ( in regex; marked by <-- HERE in m/^ServiceCategoryName=( <-- HERE .*/ at -e line 1. #### c:\@Work\Perl\monks>perl -wMstrict -le "my $str= 'ServiceCategoryName=(3,1,0,1,1,0)'; ;; if ($str =~ m/^ServiceCategoryName=\((.*)\)/) { print qq{parenthesized substring: '$1'}; my @array = split /,/, $1; print qq{first split element: '$array[0]'}; } " parenthesized substring: '3,1,0,1,1,0' first split element: '3'