my $string="{'totalResultsCount':71-24,'securityList':[{'cusip':'91%279-6.H:Y8','issueDate':'2016-06-02T00:00:00','securityType':'Bill'}"; $string =~ /'cusip':'(\w+\-\$\.\%)'/; print " first is : $1 \n\n"; #### Use of uninitialized value in concatenation (.) or string at sample.pl line 7. first is : #### first is :912796HY8