Easy. Dunno why it matters how many command-line arguments there are. But hey! -- We all have to make some effort...
in reply to Adding command line arguments.
my $even = -1<<31;
$even += 2;
} while ($even != -1<<31);
- Untested code.
- You might run out of paper if you print the output.
- Only works for 32-bit 2's complement machines.
- Even there, it doesn't really print all the even numbers.
- 1's complement machines (does Perl run on any?) will print odd numbers too
- Doesn't test the generated numbers for evenness.