in reply to Grouped Regular Expression not set assign default value

#!/usr/bin/perl # http://perlmonks.org/?node_id=1209586 use strict; use warnings; local ($/, $\) = ("<SUBEND", "\n"); /SUBEND/ and print "Update Command ", join ',', /MSISDN=(\d+)/ ? "<$1>" :'MSISDN=notSet', /C=(\w+)/g while <DATA>; __DATA__ <SUBBEGIN MSISDN=123476789678; ODBIC=BIC; ODBOC=BAOC; <SUBEND <SUBBEGIN ODBIC=BIC; ODBOC=BAOC; <SUBEND