in reply to Generate list of possibilities from incomplete input

Sometimes brute force is best. Here two foreach loops iterate the parameters of substr. The function uniq in the module List::Util removes the duplicates.
use strict; use warnings; use List::Util qw(uniq); my $given_string = '0ae4bb830'; my @results; foreach my $pos ( 0 .. 9 ) { foreach my $chr ( '0' .. '9', 'a' .. 'f' ) { my $out = $given_string; substr( $out, $pos, 0 ) = $chr; push @results, $out; } } { local $, = "\n"; print uniq(@results); }
Bill