Jump to content

Calendar Program written in PERL and displayed in HTML


bobano

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.

Thanks.
Link to comment
Share on other sites

  • 5 years later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.