CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
help me i need a encoding decoding perl script plz

 



rishabh
New User

Oct 28, 2008, 9:02 PM

Post #1 of 2 (1493 views)
help me i need a encoding decoding perl script plz Can't Post

You are going to develop a PERL script that will perform encoding and decoding of plain

text messages. It must exhibit the following behavior:

The script is to be called encode (note: no .pl on the end)

input (the message to decode or encode) will be accepted on STDIN

output (the result of processing the message) will be sent to STDOUT

Any error messages will be sent to STDERR

The script will have 1 compulsory command line argument which is the key to use

for decoding or encoding. It will default to encoding the message if no other

command line argument is specified. An optional second command line argument is

to specify the action to be taken (encode or decode the message), -e means encode

the message, -d means decode the message. When given 2 command line

arguments the script should be able to accept them in either order.

The script needs to do basic checking which includes the following:

If no arguments are given the script must exit giving an error message stating how

the script is to be used and that no command line arguments were given

If more than 2 arguments are given the script must exit giving an error message

stating how the script is to be used and that too many command line arguments were

given

The key can only contain lower case letters (ie a-z) and can not contain more than 1

of any letter. You need to check for this and exit giving an error message if

necessary.

The script will handle uppercase as well as lowercase (ie a-z and A-Z) but will

ignore everything else (ie numbers, spaces, punctuation etc.).



Your script must have commenting (Don't go overboard on commenting
Attachments: assignment unix perl.doc (28.5 KB)


KevinR
Veteran


Oct 28, 2008, 10:12 PM

Post #2 of 2 (1491 views)
Re: [rishabh] help me i need a encoding decoding perl script plz [In reply to] Can't Post

You should do your own school mate.
-------------------------------------------------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives