Prefetch Technologies // Keeping your cache lines cozy

Printing ranges with Perl

When developing Perl scripts, it is often useful to process a range of characters or numbers. This is easily accomplished with Perl's ".." range operator:

$ perl -e 'foreach (1 .. 10 ) { print "_ "; }'
1
2
3
4
5
6
7
8
9
10

Perl seems to contain just about everything, and is definitely the Cadillac of programming lanaguages.