in reply to Find out, if "use warnings(all)" and "use strict(all)" are used

If you are using warnings and strict as in your script you can check %INC (perlvar) for those modules, for example:
if (exists($INC{'strict.pm'})) { print "strict\n" } if (exists($INC{'warnings.pm'})) { print "warnings\n" }
Warnings can also be switched on with the -w command line option, and this is what $^W is used for. In this case just test for truth. So for warnings you may need:
if (exists($INC{'warnings.pm'}) || $^W) {print "Warnings\n"};