Implement a program that processes an input file

Assignment Help Programming Languages
Reference no: EM13316033

Programming Assignment 1 (Perl)

Problem Sets: Note: write programs using Perl

1. Use a loop structure and code a program that produces the following output (user can specify how many lines need to be printed using a command line argument):

977_structure.png


2. Implement a program that processes an input file by changing every occurrence of an old string into a new string. (e.g., the usage is: chstr.pl file oldstring newstring, chstr.pl is your program name, file, oldstring and newstring are parameters specified by user.)

3. (Extra Credits) Given an input file, such as text.txt, write a program to perform the following two tasks: 1) it counts the number of words in the file; 2) it takes one number x as argument, and display the top x most frequency words in the file.

4. List 3 key language features of Perl and evaluate them (state both advantages and drawbacks) using short paragraphs.

Reference no: EM13316033

Questions Cloud

He wishes to select the savings institution that will give : A friend was left $50,000 by his uncle. He has decided to put it into a savings account for the next year or so. He finds there are varying interest rates at savings institutions
What is the tension in the line to the bottom of the tank : An object is submerged in a water tank and tethered by a line to the bottom of the tank. If the object has a density of 45 kg/cubic meter and a volume of 2.5 cubic meters, what is the tension in the line
What is the nominal annual interest rate : A student bought a $75 used guitar and agreed to pa for it with a single $85 payment at the end of 6 months Assuming semiannual (every 6 months) compounding, what is the nominal annual interest rate? What is the effective interest rate?
Decide that the normal level of the interest rate has : In Keynes’s analysis of the speculative demand for money, what will happen to money demand if people suddenly decide that the normal level of the interest rate has declined? Why?
Implement a program that processes an input file : Implement a program that processes an input file by changing every occurrence of an old string into a new string. (e.g., the usage is: chstr.pl file oldstring newstring, chstr.pl is your program name, file, oldstring and newstring are parameters ..
Many economists are worried that a high level of budget : Many economists are worried that a high level of budget deficits may lead to inflationary monetary policies in the future. Could these budget deficits have an effect on the current rate of inflation?
The more credible the policymakers who pursue an : The more credible the policymakers who pursue an anti-inflation policy, the more successful that policy will be. Is this statement true, false, or uncertain? Explain your answer.
Compute the acceleration of the box : A student decides to move a box of books into her dormitory room by pulling on a rope attached to the box.  Find the acceleration of the box
Find the rotational frequency of the wheel : A large wheel-shaped space station, 120 m in diameter, Find the rotational frequency of the wheel

Reviews

Write a Review

Programming Languages Questions & Answers

  Calculate interest on account balance-get total amount due

Accepts account balance and calculates interest on Account balance. It then adds on interest to get total amount due.

  Write a program to compute the probability

Write a program (or a peudocode) to compute the probability that at least 2 people have the same birthday, given there are 2, 3, 4,....,60 people in the room.

  Performance comparison- rsa versus aes

Exercise the idea that digital certificates are verified using a chain of trust. The trust anchor for the digital certificates is the Root Certificate Authority (CA)

  Design bank account class with data members-member functions

Design the Bank Account class with suitable data members and member functions - think of attributes or features of a bank account - think of kind of data (and actions) you require to open account.

  Use a while loop to calculate terms of summation

Write function called estimate_pi that uses this formula to calculate and return estimate of π. It must use a while loop to calculate terms of summation until last term is smaller than 1e-15.

  Explain the project manuals for python and java

Overview: Understand TCP socket programing by developing a (multi-threaded) Web server. You may use Python, Java, or C++ as the programing language. The project manuals for Python and Java are attached to this document, which have provided partial..

  Program to display only unique values which user entered

Program to display only the unique values which the user entered. Give for the "worst case" in which all 20 numbers are different. use smallest possible array to solve this problem.

  Program to create new departments to sustem

An ability to add new departments to system. The program should permit you to create new departments. Each department has a name, and a location (e.g. "Sydney" or "Tokyo").

  Write program where dealer-s five-card hand is dealt

Write a program where the dealer's five-card hand is dealt "face down" so the player cannot see it. The program should then evaluate the dealer's hand.

  Explain programming language is machine independent

Explain what does it mean to say that programming language is machine independent? What do you mean by operator precedence? Depending on operator precedence, what values could be related with expression 6 + 2 * 3?

  Write script to inputs five number and finds negative number

Write down the script which inputs five number and finds out and outputs XHTML text which displays number of negative numbers input.

  Create the program uses two arrays to hold employee names

Create the program which uses two arrays: one to hold employee names and one to hold employee salaries (standard US currency, two decimal points). The program must prompt user to enter employee names.

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