in reply to RFC: Context tutorial

Since you're going to be helping newcomers with this tut, you might want to provide some brief explanations of how they can try out your illustrations.

IOW, you might want to occasionally go off-topic. For instance, just before the second code block ("Example 3") something like this might be valuable:

Go ahead; try it out. If you're on a Windows box, you can run the code in Example 1 from the command prompt like this:

perl -e "@now = localtime(); for $now(@now) {print $now;}" 432351301092120 perl -e "$now = localtime(); print $now;" Tue Jan 13 05:26:30 2009

If you're on Linux or a derivative like newer Macs, replace the double quotes above with single quotes.

Now, back to context.

Downside: You'll need to add a bit to some of the more fragmentary code blocks -- for instance, for example 6 *1, you might add something like this:

To see this effect at the command prompt, try:

perl -e "my $x = clock(); sub clock { return localtime(); } print $x;" Tue Jan 13 05:47:55 2009

For contrast:

perl -e "my @x = clock(); sub clock { return localtime(); } print @x;" 404851301092120

As you can see, the way your assign the value returned by the sub forces a particular context.

*1 Yes, number them all, not merely for consistency, but also because doing so would make it easier to refer back to a prior example, when elaborating a distinction seems appropriate.

htih