$^W: Check the '-w switch'
if (!$^W) { print "You should use the -w switch."; } open FILEHANDLE, "<file.dat"; print FILEHANDLE "Hello!"; close FILEHANDLE;