[JaxPM] Perl Question

JONES, WILLIAM C wcjones at exchange.fccj.org
Thu Jul 12 06:41:01 CDT 2001


On the jacksonville-pm-list; Jax.PM'er "JONES, WILLIAM C" <wcjones at exchange.fccj.org> wrote -

OK -

A while back I found/saw/was e-mailed the following code (my apologies to
the original author  :)

Anyways, I like it - so I have a question for the Jax.PM'ers here  :)

How would/could you add code/change code so that you could make TODAY
clickable as an SSI or CGI link?

Sx :)


-----Original Code-----

#!/usr/bin/perl -w

my $month;
open(CAL,"cal |") or die "Cannot get output from cal\n";
$month = <CAL>;

($month) = ($month =~ /\s+(\w+)\s+/);
# Grab only the first part.
print "<table>\n";
print "<tr>\n<td colspan=7 align=center>$month</td>\n</tr>\n";

for (<CAL>) {
        my @row;
        s/   /## /g;
        s/\s*$//;
        s/^\s+//;

        print "<tr>\n";
        (@row) = split(/\s+/,$_);

        for (@row) {
                s/##/ /g;
                print "<td align=right>$_</td>\n";
        }
        print "</tr>\n";
}

print "</table>\n"


Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list