in reply to Prime number generator
and neither does:{for(2..$p){$i%$_ or$p=0}print$i if$p;$p=$i++,redo}
but when I try this:{for(2..$p){$i%$_ or$p=0}print"$i" if$p;$p=$i++,redo}
it works just fine. I'm on perl 5.8.7 on both Mandriva Linux and ActiveState.{for(2..$p){$i%$_ or$p=0}print"$i$/" if$p;$p=$i++,redo}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Prime number generator
by rhesa (Vicar) on Jul 22, 2006 at 01:17 UTC | |
by mr_mischief (Monsignor) on Jul 26, 2006 at 22:46 UTC |