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;
|
---|
In Section
Seekers of Perl Wisdom