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


in reply to Re^2: list of four digit lock combinations without repeated digits
in thread list of four digit lock combinations without repeated digits

Here's another version without the @-

Just match any four of the digits (from an ordered string).

#!/usr/bin/perl # https://perlmonks.org/?node_id=1217042 use strict; use warnings; '0123456789' =~ /(.).*?(.).*?(.).*?(.)(?{print "$1$2$3$4\n"})(*FAIL)/;
  • Comment on Re^3: list of four digit lock combinations without repeated digits
  • Download Code