Cookies management with perl, Programming Languages

One of the main strengths of the Perl programming language are its powerful text manipulation features. In this assignment, you will put them to  use for writing a Perl program that can manage a simplified version of the so-called "browser cookies".

These are the specifications for your Perl program:

1.  The file with your program must be named cookiemgr.pl

2.  The program must be invoked as:

cookiemgr.pl cookies_file [options]

The program must check that its first argument exists, is a file and is readable. If not, it must print string:

Error: a valid file must be passed as first argument to the standard output, and exit. The first argument is compulsory while the following arguments are optional. The arguments are described in the following.

3.  File  cookies_file can have any arbitrary name. It must be a file of  text with the following format:

a.  The file consists of an arbitrary number of lines (including, possibly, zero lines).

b.  Each line must contain four fields separated by commas.

c.  The four fields are: cookie name, cookie value, hostname and expiry date.

d.  The first three fields are strings of arbitrary (yet reasonably limited) length; the characters in these strings can be any of: uppercase letters, lowercase letters, decimal digits, the underscore and the dot.

e.  The expiry date field is a string of decimal digits in the so-called  Unix epoch format.

The following example is the ultimate specification for the format of file cookies_file:

SessionID,029380,xyz.org.au,1385874000

ASPX_ANONYMOUS,CjnjrB,xyz.org.au,1356912000

SESSION_COLOUR,red,nosite.com.au,1341014400

SESSION_ACTIVE,FALSE,nosite.com.au,1341014400

username001,massimo.piccardi,hello.uts.edu.au,2145830400

username012,john.smith,hello.uts.edu.au,2145830400

username013,michael.zhang,hello.uts.edu.au,2145830400

Posted Date: 3/30/2013 1:18:38 AM | Location : United States







Related Discussions:- Cookies management with perl, Assignment Help, Ask Question on Cookies management with perl, Get Answer, Expert's Help, Cookies management with perl Discussions

Write discussion on Cookies management with perl
Your posts are moderated
Related Questions
#quFollow the my shell programming guidelines as in the other assignments. Write a shell script to send a customized mail message to the users listed on the command line by login (

You need to create a Fraction calculator program.You need to create a Fraction class to represent fraction objects and a FractionCalculator class that will perform operations on fr

hello there, I making a program for the collage but I got stuck at one point, I have a timmer that moves object pnl with the pnl.left function, but I want it when it gets to end of

I do have an assignment in operating systems programming ... how can i attach my file?

can you give me online education system E-R daigram..

You will soon receive in an email a personalized assignment that tells you the nature of the "Empirical Data" you are to produce with a Pascal program for HW3. HW3 is about generat

Villa La Fourche Ltd is a small family business situated in the East Coast of Mauritius, more precisely Trou d'eau Douce.   The compound comprises of 6 independent villas, each of

The schematic of the traffic light controller is as shown in figure 1. There are three control buttons on the panel: HAZ (Hazard), LT (Left) and RT (Right). Whenever, HAZ is clicke

ADO. NET ADO.NET (ActiveX Information Things for .NET) is a set of programs elements that developers can use to accessibility data and data solutions. It is an element of the platf

write a function that raises an integer to a positive integer power. call the function x_to_the_n taking two integer arguments x and n. have the function return a long int, which r