# test ($h,$w,$/)=glob<>;$_=<>; $h--; /^([#.]{$w}\n){$h}[#.]{$w}\n*$/ or die;