Don't check for undefined matches $1='129' $2='-' $1='129A' $2='&' $1='B' $2='-' Use of uninitialized value in concatenation (.) or string at test.pl line 8. $1='131' $2='' Use of uninitialized value in concatenation (.) or string at test.pl line 8. $1='NORTH' $2='' Check for undefined matches $1='129' $2='-' $1='129A' $2='&' $1='B' $2='-' $1='131' $2='undef' $1='NORTH' $2='undef' Pseudo Split '129', '-', '129A', '&', 'B', '-', '131', 'undef', 'NORTH', 'undef', 'AV',