in reply to Re^3: Simple prog isnt cooperating
in thread Simple prog isnt cooperating

       if ( $Namelist =~  m/(\w+a)/  {

You have opened 2 sets of brackets but only closed one.

if ( $Namelist =~ m/(\w+a)/ ) {