All posts at the time of writing, including the OP, seem to assume that passwords only contain digits; at least, that's all that's being tested.
The code above produces the same output as yours with your test set and suitable modification to the print statement and $min set to 3.
Give a man a fish: <%-{-{-{-<
In reply to Re^2: Check a string for consecutive digits
by AnomalousMonk
in thread Check a string for consecutive digits
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |