1 2 3 4 5 6 7 8 9
#!/usr/bin/env perl6 sub MAIN(Int $multiplier) { (1 .. ∞) .map(* * $multiplier) .grep(/^<[01]>+$/) .head(1) .say() }