Perl - write a subroutine to prompt the user

Assignment Help Programming Languages
Reference no: EM131002703

 Exercise 1 &2 

Exercise 1.   
Write a subroutine to prompt the user for any message (like "what is your name?"). The sub will collect the user's answer and return it back to the call (in the main program above the subroutine). Print out the returned string from the sub.
 

Exercise 2.Write a subroutine that keeps prompting for a filename until a valid file is entered by the user (print out "file found, thanks") or until five attempts have failed (print out "you did not enter a valid file name"). Call the subroutine from the main part of your program. The sub in this case does not return any value. Show the entire program (not just the sub).

Programming Language: Perl

Reference no: EM131002703

Questions Cloud

Determine spring constant that technician oils calculate : She fires a 0.0100kg bullet at a 500.0g wooden block that is attached to a massless spring;the bullet is traveling at 1000m/s when it strikes the block.The bullet lodges inside the block and the combination compresses the spring by 0.200m before i..
Logarithmic transformation of the data : A logarithmic transformation of the data is postulated to yield Y1 and Y2, random samples from normal populations with respective postulated means 0 and 0.25, and postulated equal standard deviation 0.25.  Is  there  evidence  in  the  log-transfo..
Prepare the journal entries for 2011 and 2012 : Prepare the journal entries for 2011 and 2012 to record the cash contribution to plan assets and benefit payments to retirees.
Problem regarding the independent normal populations : Samples are to be taken from two independent normal populations, one with variance σ2 = 10, the other with a variance twice the magnitude of the ?rst one.
Perl - write a subroutine to prompt the user : Write a subroutine to prompt the user for any message (like "what is your name?"). The sub will collect the user's answer and return it back to the call (in the main program above the subroutine). Print out the returned string from the sub.
Determine the separation of the lenses : The final virtual image is100 cm from the eyepiece at the position of minimum eyestrain. Determine the separation of the lenses. Assume that the near point distance is 25 cm. Express your answer to two significant figures and include the appropriate..
Determine the missing hypothesis test characteristic : In the following, given α = 0.05 and σ = 1.0, determine the missing hypothesis test characteristic parameter for a two-sided, 1-sample z-test:
Investigate parametric equations and plane curves : The goal of this problem is to investigate parametric equations, plane curves and implicit/explicit formsof surfaces and curves.
Determine the rejection region : A random sample of size n = 100 from a normal population with unknown mean and variance is to be used to test the null hypothesis, H0 : μ = 12, versus the alternative, H0 : μ /= 12. The observed sample standard deviation is s = 0.5..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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