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
W.A.S.S to find the maximum of three numbers Program # W.A.S.S to find the maximum of three numbers echo "Enter three No.:" read no1 read no2 read no3 if test $no1 -gt $n

UNIX Operating System 1. Explain all the layers present in a UNIX Architecture? List and explain each of them. 2. Describe the term Inter-Process Communication. What are var

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

There actually isn't all that much to this section. All we are going to do now is work a quick illustration using Laplace transforms for a 3 rd order differential equation therefo

write a program to draw a cow. Now, draw a cow standing amongst the grass, with (say) 500 blades of grass. Each blade of grass should be a separate random green line. Do all your d

Windows Communication Foundation The Microsoft windows Interaction or communication foundation (or WCF), formerly known as "Indigo", is an application selection program (API) in th

MVC Framework The ASP.NET MVC Structure is a web program framework that tools the model-view-controller (MVC) design. According to ASP.NET, it allows application designers to devel

Name : Jaya Malathy IC No : 99011460923 Quiz 1 : 20.5 Quiz 2 : 22.5 Quiz 3 40.5 Total marks = 83.5 Name IC No Quiz1 Quiz2 Quiz3 Grade --- ---- ---- ---- ---- ---- Jaya 990

Lazytown Constabulary are concerned that young people in the town are unaware of the sorts of crime that they might encounter in their daily lives and are concerned that they may b

I need an efficient and fast reverse engineer with good knowledge of assembly x86 language, strong reverse engineering skills, IDA Pro (Hex-Rays) to Linux game routine, C, C++ prog