Y:\>perl -MBenchmark -we "print timethese( 10_000_000, {Regex, '$_=0; print q[] if $_ !~ /^$/', NotEq, '$_=0; print q[] if $_ ne qq[]' } )" Benchmark: timing 10000000 iterations of NotEq, Regex... NotEq: 27 wallclock secs (26.41 usr + 0.00 sys = 26.41 CPU) @ 378658.79/s (n=10000000) Regex: 37 wallclock secs (36.69 usr + 0.00 sys = 36.69 CPU) @ 272531.55/s (n=10000000) HASH(0x8c134b0)