if(($test =~ tr/eE/eE/ > 1) || (index(lc($test), "e") + 1 >= index($test, ".")) { print "falsches eingabeformat\n"; }