An Example of Pre

Here is a paragraph of regular text. Note the use of a variable width font, and the fact that line breaks and extra white space are ignored when the text is displayed. This shoud be contrasted with the pre that follows.


sub main

{

    $| = 1; # autoflush

    processArguments();

    if (! -f $lockFile) {

        if (open(LOCKFILE, ">$lockFile")) {

            print LOCKFILE "lock file for $0\n";

            close(LOCKFILE);

        }

    }

    open(LOCKFILE, "$lockFile") || 

             fail("cannot open lock file $lockFile: $!");

    getLock(\*LOCKFILE);

    # check the args are OK

    my $newArgs = "server=$server;port=$port;month=$month;tz=$TZ\n";

    my $oldArgs = "";    

    my $ok = 0; # assume we can't use the cache

    # see if we can use the cache:

    if (-f $cacheFile && ! -s $cacheFile) {

        unlink($cacheFile) || fail("can't unlink cache file $cacheFile");

    }

    if (-f $cacheFile && -s $cacheFile && -f $argsFile) {

        if (open(ARGS, "<$argsFile")) {

            $oldArgs = <ARGS>;

            chomp($oldArgs);

            if (defined($oldArgs) && $oldArgs eq $newArgs) {

                $ok = 1;

            }

            close(ARGS);

        }

    }