print "$dat\n"; #Print to screen here and it does work here.