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";

Replies are listed 'Best First'.
Re^3: =~ matches non-existent symbols
by rnewsham (Curate) on Nov 18, 2014 at 22:34 UTC

    You are correct, I had not considered how inefficent that method is. Thanks for pointing it out.