in reply to Matching a truncated word
my @word = split //, $word_to_match; my $match = 0; for (0 .. $#word) { $match = 1 && last if $word_to_compare eq join //, @word[0..$_]; } print "Matched!\n" if $match;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |