Thread Primzahlalgorithmus (14 answers)
Opened by format_c at 2004-06-22 20:17

Taulmarill
 2004-06-23 11:36
#83653 #83653
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
ah, jetzt hab ich's, hab's bei perlmonks gefunden

Quote
We match 2 or more ones in succession, in a non-greedy fashion. That means, it'll first try the regex matching "11" in the parens, and if the rest of the regex fails, it'll backtrack and try "111" in the parens, and so on. (sounds like a for loop...)


wichtig dabei ist, dass man nicht wie ich zu blind sein sollte um my $unaer = (1 x shift); zu sehen.
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B

View full thread Primzahlalgorithmus