Cookies management with perl, Programming Languages

Assignment Help:

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


Related Discussions:- Cookies management with perl

Program for searching by indexing text files, Write a program that can faci...

Write a program that can facilitate searching by indexing text files according to words. In this task, you are given a large text file, sample.txt, which you will need to index the

Help with c assignment, You will design and implement a program that will •...

You will design and implement a program that will • analyse the various characteristics of a maze, represented by a particular coding of its basic con- stituents into numbers store

Design and implement program, Tamagochi were all the rage in the 90's as a ...

Tamagochi were all the rage in the 90's as a small toy that had limited functionality but modelled a pet. The "owner" could do the following • Feed the pet • Heal the pet

Shell script to print right traingle, Normal 0 false false ...

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

Input output program, Problem Specification I/O programming is the \bre...

Problem Specification I/O programming is the \bread and butter", the raison d'etre, of microcontrollers. After all, our definition of a microcontroller is \a microprocessor wit

Java swing, Expertsmind brings you unique solution in java assignments ...

Expertsmind brings you unique solution in java assignments Swing Move is the primary Java GUI gadget tool set. It is part of Oracle's Java Groundwork Sessions (JFC) - an A

Example of arithmetic involving matrices, Example- Arithmetic :  Given th...

Example- Arithmetic :  Given the subsequent two matrices, So calculate A-5B. Solution There isn't much to do now other than the work. We first multiplied

Shell script to check whether user has logged in or not, Normal 0 ...

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

3 halves, #1. Every mathematics student likes primes numbers. Every mathema...

#1. Every mathematics student likes primes numbers. Every mathematics student like parabolas. Let''s put them together to have some fun: Consider two natural numbers a and b. Of co

Create a reservation system, Villa La Fourche Ltd is a small family busines...

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

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd