Alright so I am a computer science student. Very amature programmer. Just now started learning Perl. I have a programming assignment for class and would love someone to give me a few hints on how to get started. At this point I am completely lost. Here is the parameters of the assignment word for word from the teacher.

Create a program called get_name.pl and save it at UISACAD5 server in a folder named perlproject. This program reads the passwd.bak file at /etc directory in UISACAD5 server, queries a username and returns the home directory and default shell used. The relevant fields are field number five and number six of the /etc/passwd.bak. Start counting the first field or column as zero, then one, etc. The fields are separated by a colon.

The program can be ran by calling the program name and followed by one argument or parameter, that is, enter the program name and the username (UIS account) in the command line. For example,
$get_name.pl username

The screen output would be:
Home directory: /export/home/username
Shell used : /bin/bash

Alright, I'm an idiot and was typing in password.bak instead of passwd.bak
So I definitely have access to the file as I just discovered. Now if anybody could give me a hint as to how to get started on this, I'd be very much in your debt.

In reply to Perl Project: Text Search by Sharp

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.