The listprimes() can be rewritten as:
Which hopefully clarifies it.sub listprimes { my ($n) = @_; return join " ", grep {$_ <= $n} @primes; }
The best defense against logic is ignorance.
In reply to Re: Perl program - I hope I can more understand my code
by NetWallah
in thread Perl program - I hope I can more understand my code
by brianphan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |