my $i = 0; while (local $_ = substr($foo,$i++,1)){ if (++$_ == 0) { print "$foo Contains Alpha Characters\n"; last; } }