in reply to Odometer pattern iterator (in C). (Updated.)
#!/usr/bin/perl # http://perlmonks.org/?node_id=1128230 use strict; $_ = '00111'; 1 while print("$_\n"), s/.*\K01(.*)/10 . reverse $1/e;
gives
00111 01011 01101 01110 10011 10101 10110 11001 11010 11100
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Odometer pattern iterator (in C).
by hdb (Monsignor) on May 29, 2015 at 09:12 UTC | |
by Discipulus (Canon) on May 29, 2015 at 09:18 UTC | |
Re^2: Odometer pattern iterator (in C).
by salva (Canon) on May 29, 2015 at 09:48 UTC | |
by Laurent_R (Canon) on May 29, 2015 at 11:23 UTC | |
Re^2: Odometer pattern iterator (in C).
by BrowserUk (Patriarch) on May 29, 2015 at 11:58 UTC | |
by hdb (Monsignor) on May 29, 2015 at 12:06 UTC | |
by BrowserUk (Patriarch) on May 29, 2015 at 12:36 UTC | |
by hdb (Monsignor) on May 29, 2015 at 12:59 UTC | |
by BrowserUk (Patriarch) on May 29, 2015 at 13:10 UTC | |
| |
by Anonymous Monk on May 29, 2015 at 15:47 UTC | |
by BrowserUk (Patriarch) on May 29, 2015 at 16:43 UTC | |
by Anonymous Monk on May 29, 2015 at 23:02 UTC | |
by BrowserUk (Patriarch) on May 30, 2015 at 02:18 UTC | |
|
In Section
Seekers of Perl Wisdom