Write a perl script that prints the contents of a file, Programming Languages

Write a Perl script that prints the contents of a file

  • Write a Perl script that prints the contents of a file, prefixing each line with a line number. The script should accept exactly one argument representing the name of the file.
  • The script should be able to handle the following error conditions:

 

  1. Incorrect number of arguments
  2. The specified argument is not a file.
  • You cannot use the UNIX "cat" command in this assignment. You must use Perl to read the file and count the lines.
  • You cannot use the UNIX "nl" command in this assignment.
  • The printf function in Perl is useful for formatting numbers.
  • The script must be able to execute on Einstein
  • The script file name must be: linenum
  • The script must be located in $HOME/itec400/homework
  • Make sure the permissions on the your itec400 directory are 705
  • Make sure the permissions on your script are 705.
Posted Date: 2/18/2013 5:46:31 AM | Location : United States







Related Discussions:- Write a perl script that prints the contents of a file, Assignment Help, Ask Question on Write a perl script that prints the contents of a file, Get Answer, Expert's Help, Write a perl script that prints the contents of a file Discussions

Write discussion on Write a perl script that prints the contents of a file
Your posts are moderated
Related Questions
We are looking for Pool Services Software Our company Pool Hands LLC is looking to build software for our internal use. We would like the software built therefore that it could

What is URL describe theri protocol? URL basicallt stands for uniform resource locator. A URL is a pointer to a particular resource on the Internet at a particular location.

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

How to run java program?

We are need of a PrestaShop Expert We are getting a fresh design created for our Jewellery website. This job is in 2 parts 1. The website engine is PrestaShop as well as w

Advantages of asp.net mvc framework MVC is a conventional style design that many designers are acquainted with. Some kinds of Web programs will advantage from the MVC structur

While working in the eHealth Applied Research lab at Mohawk College, you are asked to transform an xml file into an XHTML representationusing XSLT for display in a browser.The xml

Write out the Syntax of Nested if Statements? The universal form is                         If(expression 1)                         {

Most popular news websites publish their RSS ( Really Simple Syndication ) feeds. If you haven 't heard of RSS, you may have a look at this article on Wikipedia. In this assignm

question 1: In the opening lecture I spoke about general changes in business - flatter organizations, process orientation as opposed to functional silos, focus on supply chains, gr