http://www.perlmonks.org?node_id=1038864


in reply to index using a range

Most cryptic:
use List::Util qw/min/; $Str1 = "000001"; print min grep { $_ >= 0 } map { index $Str1, $_ } 1..9;