On Wed, 2005-05-11 at 15:21 -0400, Bogart Salzberg wrote:
> #!/usr/bin/perl
> 
> # by Bogart Salzberg, InkFist.Com
> 
> for (12345 .. 54321) {
>       print ++$count, "\t", $_, "\n" if /
>       ([1-5])
>       (?!\1)([1-5])
>       (?!\1|\2)([1-5])
>       (?!\1|\2|\3)([1-5])
>       (?!\1|\2|\3|\4)([1-5])
>       /x;
> }

Nice! Inspired this slightly simplified version:
for (12345 .. 54321) {
        print ++$count, "\t", $_, "\n"
                if /[1-5]{5}/ && ! /([1-5]).*(\1)/;
}


 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to