http://qs321.pair.com?node_id=1107606


in reply to Re: =~ matches non-existent symbols
in thread =~ matches non-existent symbols

What a waste. This will slow down the program by so much and it'll use up so much more memory than needed. You could simply use
use strict; use warnings; my $bad = 0; while (<>) { if (!/^[actg]+$/i) { ++$bad; last; } } print $bad ? "BAD\n" : "OK\n";