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

Assignment Help:

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.

Related Discussions:- Write a perl script that prints the contents of a file

Shell script convert the given amount into words, Normal 0 fals...

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

shell script to check that a given number is prime or not, Normal 0 ...

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

Visual basic 2010, I have to create a calorie counter and I am totally lost...

I have to create a calorie counter and I am totally lost

Depth estimation, depth estimation from block matching algorithm motion est...

depth estimation from block matching algorithm motion estimation

C-program, about how to create the program in c

about how to create the program in c

Motion field matlab with quiver, how to get the HORIZONTAL motion field fro...

how to get the HORIZONTAL motion field from motion vectors matrices

insertion sort algortihm, Define a higher order version of the insertion s...

Define a higher order version of the insertion sort algortihm. That is define functions insertBy :: Ord b => (a->b) -> a -> [a] -> [a] inssortBy :: Ord b => (a->b) -> [a] ->

Differentiate between high level and low level languages, The languages use...

The languages used in the module are of a type known as high-level languages. There is another set of languages known as low-level languages. (a) Differentiate between high-leve

Dating game program, You are to write a program that determines the day of ...

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following i

Programming, You must programme an analogue clock and digital stopwatch usi...

You must programme an analogue clock and digital stopwatch using the Processing programming language

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