Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: list of four digit lock combinations without repeated digits

by tybalt89 (Parson)
on Jun 22, 2018 at 22:45 UTC ( #1217262=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1217262]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2019-06-18 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (81 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!