Jump to content


This topic is now archived and is closed to further replies.


Calendar Program written in PERL and displayed in HTML

Recommended Posts

Hi everyone,

I am a beginner with Perl and I am trying to write a PERL program for a project that displays a one month calendar in an HTML table with the following requirements:

- one month calendar in an HTML table

- 'cal' command (UNIX) to get raw data into program

- program will accept three parameters on the command line. The first parameter is a numeric month (1 for January, 2 for February, etc.) The second parameter is the year (Ex: 2006) and the third parameter is the day of the week to start the calendar on (Ex: if user enters 'friday' as third parameter then the calendar will display the month with the first column in the calendar being Friday and then Saturday, Sunday, Monday, Tuesday, Wednesday and ending on the far right-hand column with Thursday. This will change depending on the day entered on the command line by the user).

An example of how the program would execute when run would be:

./calendar.pl 2 2006 friday

(this would display the calendar for February 2006 starting with "Friday" as the far left hand column on the calendar display)

My problem is trying to get the program to read the command line arguments entered so that the data entered by the user on the command line can be used for processing. Right now, the user types in the command to run the program (./calendar.pl) followed by the three command line parameters: 2 2006 friday it is not recognizing them.

I am not new to programming but new to using Perl so if anyone has any assistance or advice that they can give me on how to tackle this, including how to make the portion where the calendar display shifts depending on which day of the week was entered on the cmd line and how to make it work on the Web in an HTML formatted page, it would be greatly appreciated.


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.